diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2013-07-06 16:16:00 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2013-07-06 16:16:00 +0300 |
commit | bb985e99274b537ee662d630b02664a3825d8829 (patch) | |
tree | a6cf90d0005d2a1f1a66977a1a4e4901c9eb24a4 /tests/encode_unittests.c | |
parent | 314460c2a518bdfc4e5dfb87992d907461a7c0e6 (diff) |
Add pb_decode_delimited and pb_encode_delimited wrapper functions.
Update issue 74
Status: FixedInGit
Diffstat (limited to 'tests/encode_unittests.c')
-rw-r--r-- | tests/encode_unittests.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/encode_unittests.c b/tests/encode_unittests.c index 6a8f5e9e..c3634ac8 100644 --- a/tests/encode_unittests.c +++ b/tests/encode_unittests.c @@ -245,6 +245,16 @@ int main() } { + uint8_t buffer[20]; + pb_ostream_t s; + IntegerContainer msg = {{5, {1,2,3,4,5}}}; + + COMMENT("Test pb_encode_delimited.") + TEST(WRITES(pb_encode_delimited(&s, IntegerContainer_fields, &msg), + "\x09\x0A\x07\x0A\x05\x01\x02\x03\x04\x05")) + } + + { uint8_t buffer[10]; pb_ostream_t s; CallbackContainer msg; |