Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nanopb/nanopb.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-09-08 18:52:03 +0400
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2013-09-08 18:52:03 +0400
commit262c62676cf740ec3ce14a22bde47b7968fec8f0 (patch)
tree01cb3a8cc56ea58c536c9fe1d9ca3a46e96db46e /tests
parentd7f3a74388b4825d2c980c53d0a740ddfd0e4770 (diff)
Start moving the tests into subfolders. Transition to SCons for build system for the tests.
Only a few tests updated so far. Have to include all the rest before merging to mainline. Update issue 63 Status: Started
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile143
-rw-r--r--tests/SConstruct77
-rw-r--r--tests/alltypes/alltypes.options (renamed from tests/alltypes.options)0
-rw-r--r--tests/alltypes/alltypes.proto (renamed from tests/alltypes.proto)0
-rw-r--r--tests/alltypes/decode_alltypes.c (renamed from tests/test_decode3.c)0
-rw-r--r--tests/alltypes/encode_alltypes.c (renamed from tests/test_encode3.c)0
-rw-r--r--tests/backwards_compatibility/alltypes_legacy.c (renamed from tests/bc_alltypes.pb.c)0
-rw-r--r--tests/backwards_compatibility/alltypes_legacy.h (renamed from tests/bc_alltypes.pb.h)0
-rw-r--r--tests/backwards_compatibility/decode_legacy.c (renamed from tests/bc_decode.c)0
-rw-r--r--tests/backwards_compatibility/encode_legacy.c (renamed from tests/bc_encode.c)0
-rw-r--r--tests/basic_buffer/SConscript12
-rw-r--r--tests/basic_buffer/decode_buffer.c (renamed from tests/test_decode1.c)0
-rw-r--r--tests/basic_buffer/encode_buffer.c (renamed from tests/test_encode1.c)0
-rw-r--r--tests/basic_stream/decode_stream.c (renamed from tests/test_decode2.c)0
-rw-r--r--tests/basic_stream/encode_stream.c (renamed from tests/test_encode2.c)0
-rw-r--r--tests/callbacks/callbacks.proto (renamed from tests/callbacks.proto)0
-rw-r--r--tests/callbacks/decode_callbacks.c (renamed from tests/test_decode_callbacks.c)0
-rw-r--r--tests/callbacks/encode_callbacks.c (renamed from tests/test_encode_callbacks.c)0
-rw-r--r--tests/common/SConscript14
-rw-r--r--tests/common/person.proto (renamed from tests/person.proto)0
-rw-r--r--tests/common/unittestproto.proto (renamed from tests/unittestproto.proto)0
-rw-r--r--tests/common/unittests.h (renamed from tests/unittests.h)0
-rw-r--r--tests/decode_unittests/SConscript4
-rw-r--r--tests/decode_unittests/decode_unittests.c (renamed from tests/decode_unittests.c)0
-rw-r--r--tests/encode_unittests/SConscript5
-rw-r--r--tests/encode_unittests/encode_unittests.c (renamed from tests/encode_unittests.c)0
-rw-r--r--tests/extensions/decode_extensions.c (renamed from tests/test_decode_extensions.c)0
-rw-r--r--tests/extensions/encode_extensions.c (renamed from tests/test_encode_extensions.c)0
-rw-r--r--tests/extensions/extensions.options (renamed from tests/extensions.options)0
-rw-r--r--tests/extensions/extensions.proto (renamed from tests/extensions.proto)0
-rw-r--r--tests/extra_fields/alltypes_with_extra_fields.pb (renamed from tests/alltypes_with_extra_fields.pb)bin523 -> 523 bytes
-rw-r--r--tests/extra_fields/person_with_extra_field.pb (renamed from tests/person_with_extra_field.pb)bin90 -> 90 bytes
-rw-r--r--tests/missing_fields/missing_fields.c (renamed from tests/test_missing_fields.c)0
-rw-r--r--tests/missing_fields/missing_fields.proto (renamed from tests/missing_fields.proto)0
-rw-r--r--tests/multiple_files/callbacks.proto16
-rw-r--r--tests/multiple_files/callbacks2.proto (renamed from tests/callbacks2.proto)0
-rw-r--r--tests/multiple_files/test_multiple_files.c (renamed from tests/test_multiple_files.c)0
-rw-r--r--tests/no_messages/no_messages.proto (renamed from tests/no_messages.proto)0
-rw-r--r--tests/options/options.expected (renamed from tests/options.expected)0
-rw-r--r--tests/options/options.proto (renamed from tests/options.proto)0
-rw-r--r--tests/special_characters/funny-proto+name.proto (renamed from tests/funny-proto+name.proto)0
-rw-r--r--tests/testperson.pb3
42 files changed, 131 insertions, 143 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 9696b79..fb37e63 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,143 +1,6 @@
-CFLAGS=-ansi -Wall -Werror -I .. -g -O0
-DEPS=../pb_decode.h ../pb_encode.h ../pb.h person.pb.h \
- callbacks2.pb.h callbacks.pb.h unittests.h unittestproto.pb.h \
- alltypes.pb.h missing_fields.pb.h
-TESTS= decode_unittests encode_unittests \
- test_decode1 test_decode2 test_decode3 test_decode3_buf \
- test_encode1 test_encode2 test_encode3 test_encode3_buf \
- test_decode_callbacks test_encode_callbacks \
- test_missing_fields test_no_messages test_funny_name \
- test_multiple_files test_cxxcompile test_options \
- bc_encode bc_decode test_encode_extensions test_decode_extensions
-
-# More strict checks for the core part of nanopb
-CC_VERSION=$(shell $(CC) -v 2>&1)
-CFLAGS_CORE=
-ifneq (,$(findstring gcc,$(CC_VERSION)))
- CFLAGS_CORE=-pedantic -Wextra -Wcast-qual -Wlogical-op -Wconversion
- CFLAGS+=--coverage -fstack-protector-all
- LDFLAGS+=--coverage
-endif
-ifneq (,$(findstring clang,$(CC_VERSION)))
- CFLAGS_CORE=-pedantic -Wextra -Wcast-qual -Wconversion
-endif
-
-# Also use mudflap if it is available
-# To enable, run with make -B USE_MUDFLAP=y
-USE_MUDFLAP ?= n
-ifeq ($(USE_MUDFLAP),y)
- CFLAGS += -fmudflap
- LDFLAGS += -lmudflap -fmudflap
-endif
-
-all: breakpoints $(TESTS) run_unittests
+all:
+ scons
clean:
- rm -f $(TESTS) person.pb* alltypes.pb* *.o *.gcda *.gcno *.pb.h *.pb.c
-
-%.pb.o: %.pb.c %.pb.h
- $(CC) $(CFLAGS) $(CFLAGS_CORE) -c -o $@ $<
-
-%.o: %.c
-%.o: %.c $(DEPS)
- $(CC) $(CFLAGS) -c -o $@ $<
-
-pb_encode.o: ../pb_encode.c $(DEPS)
- $(CC) $(CFLAGS) $(CFLAGS_CORE) -c -o $@ $<
-pb_decode.o: ../pb_decode.c $(DEPS)
- $(CC) $(CFLAGS) $(CFLAGS_CORE) -c -o $@ $<
-
-# Test for compilability with c++ compiler
-
-pb_encode.cxx.o: ../pb_encode.c $(DEPS)
- $(CXX) $(CFLAGS) $(CFLAGS_CORE) -c -o $@ $<
-pb_decode.cxx.o: ../pb_decode.c $(DEPS)
- $(CXX) $(CFLAGS) $(CFLAGS_CORE) -c -o $@ $<
-
-# Test for PB_BUF_ONLY compilation option
-
-pb_encode.buf.o: ../pb_encode.c $(DEPS)
- $(CC) -DPB_BUFFER_ONLY $(CFLAGS) $(CFLAGS_CORE) -c -o $@ $<
-pb_decode.buf.o: ../pb_decode.c $(DEPS)
- $(CC) -DPB_BUFFER_ONLY $(CFLAGS) $(CFLAGS_CORE) -c -o $@ $<
-%.buf.o: %.c $(DEPS)
- $(CC) -DPB_BUFFER_ONLY $(CFLAGS) -c -o $@ $<
-test_encode3_buf: test_encode3.buf.o pb_encode.buf.o alltypes.pb.o
- $(CC) $(LDFLAGS) $^ -o $@
-test_decode3_buf: test_decode3.buf.o pb_decode.buf.o alltypes.pb.o
- $(CC) $(LDFLAGS) $^ -o $@
-
-test_cxxcompile: pb_encode.cxx.o pb_decode.cxx.o
-test_decode1: test_decode1.o pb_decode.o person.pb.o
-test_decode2: test_decode2.o pb_decode.o person.pb.o
-test_decode3: test_decode3.o pb_decode.o alltypes.pb.o
-test_encode1: test_encode1.o pb_encode.o person.pb.o
-test_encode2: test_encode2.o pb_encode.o person.pb.o
-test_encode3: test_encode3.o pb_encode.o alltypes.pb.o
-test_multiple_files: test_multiple_files.o pb_encode.o callbacks2.pb.o callbacks.pb.o
-test_decode_callbacks: test_decode_callbacks.o pb_decode.o callbacks.pb.o
-test_encode_callbacks: test_encode_callbacks.o pb_encode.o callbacks.pb.o
-test_missing_fields: test_missing_fields.o pb_encode.o pb_decode.o missing_fields.pb.o
-decode_unittests: decode_unittests.o pb_decode.o unittestproto.pb.o
-encode_unittests: encode_unittests.o pb_encode.o unittestproto.pb.o
-test_no_messages: no_messages.pb.h no_messages.pb.c no_messages.pb.o
-test_funny_name: funny-proto+name.pb.h funny-proto+name.pb.o
-bc_encode: bc_alltypes.pb.o pb_encode.o bc_encode.o
-bc_decode: bc_alltypes.pb.o pb_decode.o bc_decode.o
-test_encode_extensions: test_encode_extensions.c pb_encode.o alltypes.pb.o extensions.pb.o
-test_decode_extensions: test_decode_extensions.c pb_decode.o alltypes.pb.o extensions.pb.o
-
-%.pb: %.proto
- protoc -I. -I../generator -I/usr/include -o$@ $<
-
-%.pb.c %.pb.h: %.pb ../generator/nanopb_generator.py
- python ../generator/nanopb_generator.py $<
-
-breakpoints: ../*.c *.c
- grep -n 'return false;' $^ | cut -d: -f-2 | xargs -n 1 echo b > $@
-
-coverage: run_unittests
- gcov pb_encode.gcda
- gcov pb_decode.gcda
-
-run_unittests: $(TESTS)
- rm -f *.gcda
-
- ./decode_unittests > /dev/null
- ./encode_unittests > /dev/null
-
- [ "`./test_encode1 | ./test_decode1`" = \
- "`./test_encode1 | protoc --decode=Person -I. -I../generator -I/usr/include person.proto`" ]
-
- [ "`./test_encode2 | ./test_decode1`" = \
- "`./test_encode2 | protoc --decode=Person -I. -I../generator -I/usr/include person.proto`" ]
-
- [ "`./test_encode2 | ./test_decode2`" = \
- "`./test_encode2 | protoc --decode=Person -I. -I../generator -I/usr/include person.proto`" ]
-
- [ "`./test_decode2 < person_with_extra_field.pb`" = \
- "`./test_encode2 | ./test_decode2`" ]
-
- [ "`./test_encode_callbacks | ./test_decode_callbacks`" = \
- "`./test_encode_callbacks | protoc --decode=TestMessage callbacks.proto`" ]
-
- ./test_encode3 | ./test_decode3
- ./test_encode3 1 | ./test_decode3 1
- ./test_encode3 1 | protoc --decode=AllTypes -I. -I../generator -I/usr/include alltypes.proto >/dev/null
- ./test_encode3_buf 1 | ./test_decode3_buf 1
- ./test_decode3 < alltypes_with_extra_fields.pb
- ./bc_encode | ./bc_decode
- ./test_encode_extensions | ./test_decode_extensions
-
- ./test_missing_fields
-
-test_options: options.pb.h options.expected options.pb.o
- cat options.expected | while read -r p; do \
- if ! grep -q "$$p" $<; then \
- echo Expected: "$$p"; \
- exit 1; \
- fi \
- done
+ scons -c
-run_fuzztest: test_decode3
- bash -c 'ulimit -c unlimited; I=1; while true; do cat /dev/urandom | ./test_decode3 > /dev/null; I=$$(($$I+1)); echo -en "\r$$I"; done'
diff --git a/tests/SConstruct b/tests/SConstruct
new file mode 100644
index 0000000..0ec1e54
--- /dev/null
+++ b/tests/SConstruct
@@ -0,0 +1,77 @@
+env = DefaultEnvironment()
+
+env.Append(CPPPATH = ["#../", "#common"])
+
+# Build command for building .pb from .proto using protoc
+def proto_actions(source, target, env, for_signature):
+ dirs = ' '.join(['-I' + env.GetBuildPath(d) for d in env['PROTOCPATH']])
+ return '$PROTOC $PROTOCFLAGS %s -o%s %s' % (dirs, target[0], source[0])
+
+proto_file_builder = Builder(generator = proto_actions,
+ suffix = '.pb',
+ src_suffix = '.proto')
+env.Append(BUILDERS = {'Proto': proto_file_builder})
+env.SetDefault(PROTOC = 'protoc')
+
+# Define the include path to find nanopb.proto
+env.Append(PROTOCPATH = ['#../generator', '/usr/include', '.'])
+
+# Build command for running nanopb generator
+import os.path
+def nanopb_targets(target, source, env):
+ basename = os.path.splitext(str(source[0]))[0]
+ target.append(basename + '.pb.h')
+ return target, source
+
+nanopb_file_builder = Builder(action = '$NANOPB_GENERATOR $NANOPB_FLAGS $SOURCE',
+ suffix = '.pb.c',
+ src_suffix = '.pb',
+ emitter = nanopb_targets)
+env.Append(BUILDERS = {'Nanopb': nanopb_file_builder})
+env.SetDefault(NANOPB_GENERATOR = 'python ' + env.GetBuildPath("#../generator/nanopb_generator.py"))
+
+# Combined method to run both protoc and nanopb generator
+def run_protoc_and_nanopb(env, source):
+ b1 = env.Proto(source)
+ b2 = env.Nanopb(source)
+ return b1 + b2
+env.AddMethod(run_protoc_and_nanopb, "NanopbProto")
+
+# Build command that runs a test program and saves the output
+def run_test_actions(source, target, env, for_signature):
+ cmd = str(source[0]) # Name of binary
+ if len(source) > 1:
+ cmd += ' <' + str(source[1]) # Input file
+ cmd += ' >' + str(target[0])
+ return cmd
+
+run_test_builder = Builder(generator = run_test_actions,
+ suffix = '.output')
+env.Append(BUILDERS = {'RunTest': run_test_builder})
+
+# Build command that decodes a message using protoc
+def decode_actions(source, target, env, for_signature):
+ dirs = ' '.join(['-I' + env.GetBuildPath(d) for d in env['PROTOCPATH']])
+ return '$PROTOC $PROTOCFLAGS %s --decode=%s %s <%s >%s' % (dirs, env['MESSAGE'], source[1], source[0], target[0])
+
+decode_builder = Builder(generator = decode_actions,
+ suffix = '.decoded')
+env.Append(BUILDERS = {'Decode': decode_builder})
+
+# Build command that asserts that two files be equal
+def compare_files(target, source, env):
+ data1 = open(str(source[0]), 'rb').read()
+ data2 = open(str(source[1]), 'rb').read()
+ if data1 == data2:
+# open(str(target[0]), 'w').write('OK')
+ return 0
+ else:
+ return "Test failed: %s and %s differ!" % (source[0], source[1])
+
+compare_builder = Builder(action = compare_files,
+ suffix = '.equal')
+env.Append(BUILDERS = {'Compare': compare_builder})
+
+# Now include the SConscript files from all subdirectories
+SConscript(Glob('*/SConscript'), exports = 'env')
+
diff --git a/tests/alltypes.options b/tests/alltypes/alltypes.options
index b31e3cf..b31e3cf 100644
--- a/tests/alltypes.options
+++ b/tests/alltypes/alltypes.options
diff --git a/tests/alltypes.proto b/tests/alltypes/alltypes.proto
index a2cf8bb..a2cf8bb 100644
--- a/tests/alltypes.proto
+++ b/tests/alltypes/alltypes.proto
diff --git a/tests/test_decode3.c b/tests/alltypes/decode_alltypes.c
index 55d025c..55d025c 100644
--- a/tests/test_decode3.c
+++ b/tests/alltypes/decode_alltypes.c
diff --git a/tests/test_encode3.c b/tests/alltypes/encode_alltypes.c
index 982ad3c..982ad3c 100644
--- a/tests/test_encode3.c
+++ b/tests/alltypes/encode_alltypes.c
diff --git a/tests/bc_alltypes.pb.c b/tests/backwards_compatibility/alltypes_legacy.c
index b144b1e..b144b1e 100644
--- a/tests/bc_alltypes.pb.c
+++ b/tests/backwards_compatibility/alltypes_legacy.c
diff --git a/tests/bc_alltypes.pb.h b/tests/backwards_compatibility/alltypes_legacy.h
index 037b347..037b347 100644
--- a/tests/bc_alltypes.pb.h
+++ b/tests/backwards_compatibility/alltypes_legacy.h
diff --git a/tests/bc_decode.c b/tests/backwards_compatibility/decode_legacy.c
index b74172f..b74172f 100644
--- a/tests/bc_decode.c
+++ b/tests/backwards_compatibility/decode_legacy.c
diff --git a/tests/bc_encode.c b/tests/backwards_compatibility/encode_legacy.c
index e84f090..e84f090 100644
--- a/tests/bc_encode.c
+++ b/tests/backwards_compatibility/encode_legacy.c
diff --git a/tests/basic_buffer/SConscript b/tests/basic_buffer/SConscript
new file mode 100644
index 0000000..5b85e13
--- /dev/null
+++ b/tests/basic_buffer/SConscript
@@ -0,0 +1,12 @@
+# Build and run a basic round-trip test using memory buffer encoding.
+
+Import("env")
+
+env.Program(["encode_buffer.c", "#common/person.pb.c", "#common/pb_encode.o"])
+env.Program(["decode_buffer.c", "#common/person.pb.c", "#common/pb_decode.o"])
+
+env.RunTest("encode_buffer")
+env.RunTest(["decode_buffer", "encode_buffer.output"])
+env.Decode(["encode_buffer.output", "#common/person.proto"], MESSAGE = "Person")
+env.Compare(["decode_buffer.output", "encode_buffer.decoded"])
+
diff --git a/tests/test_decode1.c b/tests/basic_buffer/decode_buffer.c
index 56bbd8f..56bbd8f 100644
--- a/tests/test_decode1.c
+++ b/tests/basic_buffer/decode_buffer.c
diff --git a/tests/test_encode1.c b/tests/basic_buffer/encode_buffer.c
index 742c99f..742c99f 100644
--- a/tests/test_encode1.c
+++ b/tests/basic_buffer/encode_buffer.c
diff --git a/tests/test_decode2.c b/tests/basic_stream/decode_stream.c
index 2142977..2142977 100644
--- a/tests/test_decode2.c
+++ b/tests/basic_stream/decode_stream.c
diff --git a/tests/test_encode2.c b/tests/basic_stream/encode_stream.c
index fd25c6c..fd25c6c 100644
--- a/tests/test_encode2.c
+++ b/tests/basic_stream/encode_stream.c
diff --git a/tests/callbacks.proto b/tests/callbacks/callbacks.proto
index ccd1edd..ccd1edd 100644
--- a/tests/callbacks.proto
+++ b/tests/callbacks/callbacks.proto
diff --git a/tests/test_decode_callbacks.c b/tests/callbacks/decode_callbacks.c
index b505692..b505692 100644
--- a/tests/test_decode_callbacks.c
+++ b/tests/callbacks/decode_callbacks.c
diff --git a/tests/test_encode_callbacks.c b/tests/callbacks/encode_callbacks.c
index 3bb6a45..3bb6a45 100644
--- a/tests/test_encode_callbacks.c
+++ b/tests/callbacks/encode_callbacks.c
diff --git a/tests/common/SConscript b/tests/common/SConscript
new file mode 100644
index 0000000..ef3cdca
--- /dev/null
+++ b/tests/common/SConscript
@@ -0,0 +1,14 @@
+# Build the common files needed by multiple test cases
+
+Import('env')
+
+# Protocol definitions for the encode/decode_unittests
+env.NanopbProto("unittestproto")
+
+# Protocol definitions for basic_buffer/stream tests
+env.NanopbProto("person")
+
+# Binaries of the pb_decode.c and pb_encode.c
+env.Object("pb_decode.o", "#../pb_decode.c")
+env.Object("pb_encode.o", "#../pb_encode.c")
+
diff --git a/tests/person.proto b/tests/common/person.proto
index dafcf93..dafcf93 100644
--- a/tests/person.proto
+++ b/tests/common/person.proto
diff --git a/tests/unittestproto.proto b/tests/common/unittestproto.proto
index 7024942..7024942 100644
--- a/tests/unittestproto.proto
+++ b/tests/common/unittestproto.proto
diff --git a/tests/unittests.h b/tests/common/unittests.h
index c2b470a..c2b470a 100644
--- a/tests/unittests.h
+++ b/tests/common/unittests.h
diff --git a/tests/decode_unittests/SConscript b/tests/decode_unittests/SConscript
new file mode 100644
index 0000000..860d773
--- /dev/null
+++ b/tests/decode_unittests/SConscript
@@ -0,0 +1,4 @@
+Import('env')
+env.Program(["decode_unittests.c", "#common/unittestproto.pb.c", "#common/pb_decode.o"])
+env.RunTest('decode_unittests')
+
diff --git a/tests/decode_unittests.c b/tests/decode_unittests/decode_unittests.c
index 6ad05f0..6ad05f0 100644
--- a/tests/decode_unittests.c
+++ b/tests/decode_unittests/decode_unittests.c
diff --git a/tests/encode_unittests/SConscript b/tests/encode_unittests/SConscript
new file mode 100644
index 0000000..0864a91
--- /dev/null
+++ b/tests/encode_unittests/SConscript
@@ -0,0 +1,5 @@
+# Build and run the stand-alone unit tests for the nanopb encoder part.
+
+Import('env')
+env.Program(["encode_unittests.c", "#common/unittestproto.pb.c", "#common/pb_encode.o"])
+env.RunTest('encode_unittests')
diff --git a/tests/encode_unittests.c b/tests/encode_unittests/encode_unittests.c
index c3634ac..c3634ac 100644
--- a/tests/encode_unittests.c
+++ b/tests/encode_unittests/encode_unittests.c
diff --git a/tests/test_decode_extensions.c b/tests/extensions/decode_extensions.c
index ef6a022..ef6a022 100644
--- a/tests/test_decode_extensions.c
+++ b/tests/extensions/decode_extensions.c
diff --git a/tests/test_encode_extensions.c b/tests/extensions/encode_extensions.c
index 8857f14..8857f14 100644
--- a/tests/test_encode_extensions.c
+++ b/tests/extensions/encode_extensions.c
diff --git a/tests/extensions.options b/tests/extensions/extensions.options
index a5cd61d..a5cd61d 100644
--- a/tests/extensions.options
+++ b/tests/extensions/extensions.options
diff --git a/tests/extensions.proto b/tests/extensions/extensions.proto
index d85e819..d85e819 100644
--- a/tests/extensions.proto
+++ b/tests/extensions/extensions.proto
diff --git a/tests/alltypes_with_extra_fields.pb b/tests/extra_fields/alltypes_with_extra_fields.pb
index f9f5394..f9f5394 100644
--- a/tests/alltypes_with_extra_fields.pb
+++ b/tests/extra_fields/alltypes_with_extra_fields.pb
Binary files differ
diff --git a/tests/person_with_extra_field.pb b/tests/extra_fields/person_with_extra_field.pb
index ced3057..ced3057 100644
--- a/tests/person_with_extra_field.pb
+++ b/tests/extra_fields/person_with_extra_field.pb
Binary files differ
diff --git a/tests/test_missing_fields.c b/tests/missing_fields/missing_fields.c
index 2774184..2774184 100644
--- a/tests/test_missing_fields.c
+++ b/tests/missing_fields/missing_fields.c
diff --git a/tests/missing_fields.proto b/tests/missing_fields/missing_fields.proto
index cbb23ba..cbb23ba 100644
--- a/tests/missing_fields.proto
+++ b/tests/missing_fields/missing_fields.proto
diff --git a/tests/multiple_files/callbacks.proto b/tests/multiple_files/callbacks.proto
new file mode 100644
index 0000000..ccd1edd
--- /dev/null
+++ b/tests/multiple_files/callbacks.proto
@@ -0,0 +1,16 @@
+message SubMessage {
+ optional string stringvalue = 1;
+ repeated int32 int32value = 2;
+ repeated fixed32 fixed32value = 3;
+ repeated fixed64 fixed64value = 4;
+}
+
+message TestMessage {
+ optional string stringvalue = 1;
+ repeated int32 int32value = 2;
+ repeated fixed32 fixed32value = 3;
+ repeated fixed64 fixed64value = 4;
+ optional SubMessage submsg = 5;
+ repeated string repeatedstring = 6;
+}
+
diff --git a/tests/callbacks2.proto b/tests/multiple_files/callbacks2.proto
index 9a55e15..9a55e15 100644
--- a/tests/callbacks2.proto
+++ b/tests/multiple_files/callbacks2.proto
diff --git a/tests/test_multiple_files.c b/tests/multiple_files/test_multiple_files.c
index cb4e16d..cb4e16d 100644
--- a/tests/test_multiple_files.c
+++ b/tests/multiple_files/test_multiple_files.c
diff --git a/tests/no_messages.proto b/tests/no_messages/no_messages.proto
index 279216b..279216b 100644
--- a/tests/no_messages.proto
+++ b/tests/no_messages/no_messages.proto
diff --git a/tests/options.expected b/tests/options/options.expected
index e6179a2..e6179a2 100644
--- a/tests/options.expected
+++ b/tests/options/options.expected
diff --git a/tests/options.proto b/tests/options/options.proto
index b5badcf..b5badcf 100644
--- a/tests/options.proto
+++ b/tests/options/options.proto
diff --git a/tests/funny-proto+name.proto b/tests/special_characters/funny-proto+name.proto
index e69de29..e69de29 100644
--- a/tests/funny-proto+name.proto
+++ b/tests/special_characters/funny-proto+name.proto
diff --git a/tests/testperson.pb b/tests/testperson.pb
deleted file mode 100644
index d1eb8cf..0000000
--- a/tests/testperson.pb
+++ /dev/null
@@ -1,3 +0,0 @@
-
- Test Person7foobar@foobar.com"
- 555-12345678 \ No newline at end of file