Update doc revision and pdf cover.
[apps/agl-service-can-low-level.git] / libs / nanopb / tests / multiple_files / test_multiple_files.c
1 /*
2  * Tests if this still compiles when multiple .proto files are involved.
3  */
4
5 #include <stdio.h>
6 #include <pb_encode.h>
7 #include "unittests.h"
8 #include "multifile2.pb.h"
9 #include "subdir/multifile2.pb.h"
10
11 int main()
12 {
13     int status = 0;
14     
15     /* Test that included file options are properly loaded */
16     TEST(OneofMessage_size == 27);
17     
18     /* Check that enum signedness is detected properly */
19     TEST(PB_LTYPE(Enums_fields[0].type) == PB_LTYPE_VARINT);
20     TEST(PB_LTYPE(Enums_fields[1].type) == PB_LTYPE_UVARINT);
21     
22     /* Test that subdir file is correctly included */
23     {
24         subdir_SubdirMessage foo = subdir_SubdirMessage_init_default;
25         TEST(foo.foo == 15);
26         /* TEST(subdir_OneofMessage_size == 27); */ /* TODO: Issue #172 */
27     }
28     
29     return status;
30 }