summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/options/options.expected3
-rw-r--r--tests/options/options.proto10
2 files changed, 10 insertions, 3 deletions
diff --git a/tests/options/options.expected b/tests/options/options.expected
index e6179a27..dbd279ba 100644
--- a/tests/options/options.expected
+++ b/tests/options/options.expected
@@ -5,3 +5,6 @@ pb_callback_t int32_callback;
\sEnumValue1 = 1
Message5_EnumValue1
} pb_packed my_packed_struct;
+! skipped_field
+! SkippedMessage
+
diff --git a/tests/options/options.proto b/tests/options/options.proto
index b5badcfd..a8e557be 100644
--- a/tests/options/options.proto
+++ b/tests/options/options.proto
@@ -63,11 +63,15 @@ message my_packed_struct
}
// Message with ignored field
-// Note: doesn't really test if the field is missing in the output,
-// but atleast tests that the output compiles.
message Message6
{
required int32 field1 = 1;
- optional int32 field2 = 2 [(nanopb).type = FT_IGNORE];
+ optional int32 skipped_field = 2 [(nanopb).type = FT_IGNORE];
}
+// Message that is skipped
+message SkippedMessage
+{
+ option (nanopb_msgopt).skip_message = true;
+ required int32 foo = 1;
+}