aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Makefile
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-10-18 19:45:28 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2012-10-18 19:45:28 +0300
commitdcab39a41c0a403db38860c22426075e6ae9f25d (patch)
tree7f1824628371ec59353b0765a209e6e5518401f7 /tests/Makefile
parent900c8dd1252afe2b2474b852ae48dcb46e100505 (diff)
Remove the "buf = NULL" => skip requirement from pb_istream_t callbacks.
Rationale: it's easy to implement the callback wrong. Doing so introduces io errors when unknown fields are present in the input. If code is not tested with unknown fields, these bugs can remain hidden for long time. Added a special case for the memory buffer stream, where it gives a small speed benefit. Added testcase for skipping fields with test_decode2 implementation. Update issue 37 Status: FixedInGit
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 9b02817f..73efbe63 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -70,6 +70,9 @@ run_unittests: decode_unittests encode_unittests test_cxxcompile test_encode1 te
[ "`./test_encode2 | ./test_decode2`" = \
"`./test_encode2 | protoc --decode=Person -I. -I../generator -I/usr/include person.proto`" ]
+ [ "`./test_decode2 < person_with_extra_field.pb`" = \
+ "`cat person_with_extra_field.txt`" ]
+
[ "`./test_encode_callbacks | ./test_decode_callbacks`" = \
"`./test_encode_callbacks | protoc --decode=TestMessage callbacks.proto`" ]