diff options
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)); |