MOS Source Code
Loading...
Searching...
No Matches
test_flatten.c
Go to the documentation of this file.
1/*
2 * Tests if expected names are generated when M_FLATTEN is used.
3 */
4
5#include <stdio.h>
6#include "unittests.h"
7#include "flatten.pb.h"
8
9int main()
10{
11 TopLevelMessage msg = {0};
12 NestedMessage nmsg = msg.nested;
13 NestedLevel2 nmsg2 = nmsg.nested;
14 NestedLevel3 nmsg3 = nmsg2.nested;
15 nmsg3.nothing = 42;
16
17 msg.short_if_none = ShortIfNone_IfNone_A;
18 msg.short_if_strip_package = ShortIfStripPackage_IfPackage_A;
19 msg.short_if_flatten = IfFlatten_A;
20
21 return nmsg3.nothing; /* this sets `nmsg3` as used, to prevent warning */
22}
int main()
Definition test_flatten.c:9