MOS Source Code
Loading...
Searching...
No Matches
oneof_size.cc
Go to the documentation of this file.
1#include "oneof.pb.h"
2#include "unittests.h"
3
4extern "C" int main()
5{
6 int status = 0;
7
8 // Expected maximum encoded size:
9 // 1 byte for MyMessage.foo tag
10 // 1-5 bytes for MyMessage.foo submsg length
11 // 1 byte for SubMessage3.foo tag
12 // 5 bytes for SubMessage3.foo value
13 // 1 byte for SubMessage3.bar tag
14 // 5 bytes for SubMessage3.bar value
15 printf("Size: %d\n", (int)MyMessage_size);
16 TEST(MyMessage_size == 18);
17
18 return status;
19}
int main()
Definition oneof_size.cc:4
#define TEST(x)
Definition test.h:3