aboutsummaryrefslogtreecommitdiffstats
path: root/libs/nanopb/tests/cyclic_messages/cyclic.proto
diff options
context:
space:
mode:
Diffstat (limited to 'libs/nanopb/tests/cyclic_messages/cyclic.proto')
-rw-r--r--libs/nanopb/tests/cyclic_messages/cyclic.proto27
1 files changed, 27 insertions, 0 deletions
diff --git a/libs/nanopb/tests/cyclic_messages/cyclic.proto b/libs/nanopb/tests/cyclic_messages/cyclic.proto
new file mode 100644
index 00000000..8cab0b14
--- /dev/null
+++ b/libs/nanopb/tests/cyclic_messages/cyclic.proto
@@ -0,0 +1,27 @@
+// Test structures with cyclic references.
+// These can only be handled in pointer/callback mode,
+// see associated .options files.
+
+syntax = "proto2";
+
+message TreeNode
+{
+ optional int32 leaf = 1;
+ optional TreeNode left = 2;
+ optional TreeNode right = 3;
+}
+
+message Dictionary
+{
+ repeated KeyValuePair dictItem = 1;
+}
+
+message KeyValuePair
+{
+ required string key = 1;
+ optional string stringValue = 2;
+ optional int32 intValue = 3;
+ optional Dictionary dictValue = 4;
+ optional TreeNode treeValue = 5;
+}
+