diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2013-07-22 19:00:04 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2013-07-22 19:00:04 +0300 |
commit | ba40cacd3c4a60ccc9108d6acf7e813b1757dfd1 (patch) | |
tree | 883d44d8fd5f6d210ddf8e48748676f035f60792 /tests/test_encode_extensions.c | |
parent | 1f13e8cd2c5bb091677f35e53ae5757774e7d1ba (diff) |
Finish the testcase for extensions
Diffstat (limited to 'tests/test_encode_extensions.c')
-rw-r--r-- | tests/test_encode_extensions.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_encode_extensions.c b/tests/test_encode_extensions.c index c889dec6..8857f148 100644 --- a/tests/test_encode_extensions.c +++ b/tests/test_encode_extensions.c @@ -11,10 +11,14 @@ int main(int argc, char **argv) { AllTypes alltypes = {}; + int32_t extensionfield1 = 12345; pb_extension_t ext1 = {&AllTypes_extensionfield1, &extensionfield1, NULL}; - alltypes.extensions = &ext1; + + ExtensionMessage extensionfield2 = {"test", 54321}; + pb_extension_t ext2 = {&ExtensionMessage_AllTypes_extensionfield2, &extensionfield2, NULL}; + ext1.next = &ext2; uint8_t buffer[1024]; pb_ostream_t stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); |