diff options
author | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2015-09-12 15:45:37 +0300 |
---|---|---|
committer | Petteri Aimonen <jpa@git.mail.kapsi.fi> | 2015-09-12 15:47:56 +0300 |
commit | 0b29baf5deaa4213c08ee71fa55d3d0b2ed709e4 (patch) | |
tree | e2ec2dad3a641d91584c1a765caf964d64e28351 /tests/multiple_files/test_multiple_files.c | |
parent | 35dff3367452f89a1d8d483d0f8f601d89d78937 (diff) |
Make the generator understand included files (issue #165).
This will allow message sizes and enum options to be available
across the include files.
Currently searching for .options files for included files may
not work for all path combinations, this is related to issue #116.
Should probably make a pull request to protoc about that.
Diffstat (limited to 'tests/multiple_files/test_multiple_files.c')
-rw-r--r-- | tests/multiple_files/test_multiple_files.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/multiple_files/test_multiple_files.c b/tests/multiple_files/test_multiple_files.c index 5134f03f..292b8d7c 100644 --- a/tests/multiple_files/test_multiple_files.c +++ b/tests/multiple_files/test_multiple_files.c @@ -7,16 +7,16 @@ #include "unittests.h" #include "multifile2.pb.h" -/* Check that the size definition is obtained properly */ -static const int foo = OneofMessage_size; - int main() { int status = 0; + /* Test that included file options are properly loaded */ + TEST(OneofMessage_size == 27); + /* Check that enum signedness is detected properly */ TEST(PB_LTYPE(Enums_fields[0].type) == PB_LTYPE_VARINT); - TEST(PB_LTYPE(Enums_fields[0].type) == PB_LTYPE_UVARINT); + TEST(PB_LTYPE(Enums_fields[1].type) == PB_LTYPE_UVARINT); return status; } |