From b9baec6b4c3a04136ea0430109bc7bc1eda12685 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Sun, 13 Jan 2013 18:44:15 +0200 Subject: Add a test for the backwards compatibility of generated files. It is not necessary to maintain full compatibility of generated files for all of eternity, but this test will warn us if there is a need to regenerate the files. --- tests/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/Makefile') diff --git a/tests/Makefile b/tests/Makefile index 58b84a3b..63830999 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -7,7 +7,8 @@ TESTS= decode_unittests encode_unittests \ test_encode1 test_encode2 test_encode3 \ test_decode_callbacks test_encode_callbacks \ test_missing_fields test_no_messages \ - test_multiple_files test_cxxcompile test_options + test_multiple_files test_cxxcompile test_options \ + bc_encode bc_decode # More strict checks for the core part of nanopb CC_VERSION=$(shell $(CC) -v 2>&1) @@ -57,6 +58,8 @@ test_missing_fields: test_missing_fields.o pb_encode.o pb_decode.o missing_field 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 +bc_encode: bc_alltypes.pb.o pb_encode.o bc_encode.o +bc_decode: bc_alltypes.pb.o pb_decode.o bc_decode.o %.pb: %.proto protoc -I. -I../generator -I/usr/include -o$@ $< @@ -95,6 +98,7 @@ run_unittests: $(TESTS) ./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 + ./bc_encode | ./bc_decode ./test_missing_fields -- cgit 1.2.3-korg