Fix naming of enums when long_names=false.

Modify test case to check that options.pb.o compiles.

Update issue 42
Status: FixedInGit

Update issue 43
Status: FixedInGit
This commit is contained in:
Petteri Aimonen
2012-11-14 00:20:44 +02:00
parent 332a9ee95c
commit 02ecee2de8
4 changed files with 28 additions and 7 deletions

View File

@@ -82,7 +82,7 @@ run_unittests: decode_unittests encode_unittests test_cxxcompile test_encode1 te
./test_missing_fields
test_options: options.pb.h options.expected
test_options: options.pb.h options.expected options.pb.o
cat options.expected | while read -r p; do \
if ! grep -q "$$p" $<; then \
echo Expected: "$$p"; \

View File

@@ -2,4 +2,4 @@ char filesize\[20\];
char msgsize\[30\];
char fieldsize\[40\];
pb_callback_t int32_callback;
[^_]EnumValue1 = 1
\sEnumValue1 = 1

View File

@@ -36,4 +36,10 @@ enum Enum1
{
option (nanopb_enumopt).long_names = false;
EnumValue1 = 1;
EnumValue2 = 2;
}
message EnumTest
{
required Enum1 field = 1 [default = EnumValue2];
}