From 928becdc52d7c8805b0e4259e0682df56e637da7 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Tue, 22 Nov 2016 17:25:00 +0200 Subject: Test case for enum_to_string --- tests/enum_to_string/enum.proto | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/enum_to_string/enum.proto (limited to 'tests/enum_to_string/enum.proto') diff --git a/tests/enum_to_string/enum.proto b/tests/enum_to_string/enum.proto new file mode 100644 index 00000000..07c67363 --- /dev/null +++ b/tests/enum_to_string/enum.proto @@ -0,0 +1,19 @@ +/* Test enum to string function generation */ + +syntax = "proto2"; + +import "nanopb.proto"; + +option (nanopb_fileopt).enum_to_string = true; + +enum MyEnum { + VALUE1 = 1; + VALUE2 = 2; + VALUE15 = 15; +} + +enum MyShortNameEnum { + option (nanopb_enumopt).long_names = false; + MSNE_VALUE256 = 256; +} + -- cgit 1.2.3-korg