Add option to use short names for enum values.
Update issue 38 Status: FixedInGit
This commit is contained in:
@@ -83,9 +83,9 @@ run_unittests: decode_unittests encode_unittests test_cxxcompile test_encode1 te
|
||||
./test_missing_fields
|
||||
|
||||
test_options: options.pb.h options.expected
|
||||
for p in $$(grep . options.expected); do \
|
||||
if ! grep -qF "$$p" $<; then \
|
||||
echo Expected: $$p; \
|
||||
cat options.expected | while read -r p; do \
|
||||
if ! grep -q "$$p" $<; then \
|
||||
echo Expected: "$$p"; \
|
||||
exit 1; \
|
||||
fi \
|
||||
done
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
char filesize[20];
|
||||
char msgsize[30];
|
||||
char fieldsize[40];
|
||||
char filesize\[20\];
|
||||
char msgsize\[30\];
|
||||
char fieldsize\[40\];
|
||||
pb_callback_t int32_callback;
|
||||
|
||||
[^_]EnumValue1 = 1
|
||||
|
||||
@@ -31,3 +31,9 @@ message Message4
|
||||
required int32 int32_callback = 1 [(nanopb).type = FT_CALLBACK];
|
||||
}
|
||||
|
||||
// Short enum names
|
||||
enum Enum1
|
||||
{
|
||||
option (nanopb_enumopt).long_names = false;
|
||||
EnumValue1 = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user