aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pb.h4
-rw-r--r--tests/Makefile6
-rw-r--r--tests/test_multiple_files.c (renamed from tests/test_compiles.c)0
3 files changed, 6 insertions, 4 deletions
diff --git a/pb.h b/pb.h
index 22b10d89..5e9fad21 100644
--- a/pb.h
+++ b/pb.h
@@ -24,7 +24,9 @@
#define UNUSED(x) (void)(x)
#endif
-/* Compile-time assertion, used for checking compatible compilation options. */
+/* Compile-time assertion, used for checking compatible compilation options.
+ * If this fails on your compiler for some reason, use #define STATIC_ASSERT
+ * to disable it. */
#ifndef STATIC_ASSERT
#define STATIC_ASSERT(COND,MSG) typedef char STATIC_ASSERT_MSG(MSG, __LINE__, __COUNTER__)[(COND)?1:-1];
#define STATIC_ASSERT_MSG(MSG, LINE, COUNTER) STATIC_ASSERT_MSG_(MSG, LINE, COUNTER)
diff --git a/tests/Makefile b/tests/Makefile
index f3a64d14..a21e3c43 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -2,7 +2,7 @@ CFLAGS=-ansi -Wall -Werror -I .. -g -O0 --coverage
LDFLAGS=--coverage
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=test_decode1 test_encode1 decode_unittests encode_unittests test_no_messages
-TESTS=test_decode1 test_encode1 decode_unittests encode_unittests test_no_messages test_compiles
+TESTS=test_decode1 test_encode1 decode_unittests encode_unittests test_no_messages test_multiple_files
# More strict checks for the core part of nanopb
@@ -37,7 +37,7 @@ 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_compiles: test_compiles.o pb_encode.o callbacks2.pb.o callbacks.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
@@ -58,7 +58,7 @@ coverage: run_unittests
gcov pb_encode.gcda
gcov pb_decode.gcda
-run_unittests: decode_unittests encode_unittests test_cxxcompile test_compiles test_encode1 test_encode2 test_encode3 test_decode1 test_decode2 test_decode3 test_encode_callbacks test_decode_callbacks test_missing_fields test_options
+run_unittests: decode_unittests encode_unittests test_cxxcompile test_multiple_files test_encode1 test_encode2 test_encode3 test_decode1 test_decode2 test_decode3 test_encode_callbacks test_decode_callbacks test_missing_fields test_options
rm -f *.gcda
./decode_unittests > /dev/null
diff --git a/tests/test_compiles.c b/tests/test_multiple_files.c
index cb4e16d3..cb4e16d3 100644
--- a/tests/test_compiles.c
+++ b/tests/test_multiple_files.c