Make the generator understand included files (issue #165).
[apps/agl-service-can-low-level.git] / 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
10 int main()
11 {
12     int status = 0;
13     
14     /* Test that included file options are properly loaded */
15     TEST(OneofMessage_size == 27);
16     
17     /* Check that enum signedness is detected properly */
18     TEST(PB_LTYPE(Enums_fields[0].type) == PB_LTYPE_VARINT);
19     TEST(PB_LTYPE(Enums_fields[1].type) == PB_LTYPE_UVARINT);
20     
21     return status;
22 }