summaryrefslogtreecommitdiffstats
path: root/tests/oneof/oneof.proto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/oneof/oneof.proto')
-rw-r--r--tests/oneof/oneof.proto18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/oneof/oneof.proto b/tests/oneof/oneof.proto
new file mode 100644
index 00000000..a89ef131
--- /dev/null
+++ b/tests/oneof/oneof.proto
@@ -0,0 +1,18 @@
+import 'nanopb.proto';
+
+message SubMessage
+{
+ repeated int32 array = 1 [(nanopb).max_count = 8];
+}
+
+message OneOfMessage
+{
+ required int32 prefix = 1;
+ oneof values
+ {
+ int32 first = 5;
+ string second = 6 [(nanopb).max_size = 8];
+ SubMessage third = 7;
+ }
+ required int32 suffix = 99;
+}