Expand the multiple_files test case to include oneofs and enums
[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 /* Check that the size definition is obtained properly */
11 static const int foo = OneofMessage_size;
12
13 int main()
14 {
15     int status = 0;
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[0].type) == PB_LTYPE_UVARINT);
20     
21     return status;
22 }