From ba40cacd3c4a60ccc9108d6acf7e813b1757dfd1 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Mon, 22 Jul 2013 19:00:04 +0300 Subject: Finish the testcase for extensions --- tests/test_encode_extensions.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/test_encode_extensions.c') 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)); -- cgit 1.2.3-korg