summaryrefslogtreecommitdiffstats
path: root/tests/cyclic_messages/cyclic.proto
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-08-28 21:23:28 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-08-28 21:23:28 +0300
commitdf7234fd8b8779c9973b19b5a8fb22ee2e903982 (patch)
treef1a67e4c255370c850227f9ea3a44154da72e996 /tests/cyclic_messages/cyclic.proto
parent9e866b485319e2ede206b4eafa0b6235be0c4a38 (diff)
Fix cyclic messages support in generator. Beginnings of test.
Update issue 130 Status: Started
Diffstat (limited to 'tests/cyclic_messages/cyclic.proto')
-rw-r--r--tests/cyclic_messages/cyclic.proto25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/cyclic_messages/cyclic.proto b/tests/cyclic_messages/cyclic.proto
new file mode 100644
index 00000000..a9d158cb
--- /dev/null
+++ b/tests/cyclic_messages/cyclic.proto
@@ -0,0 +1,25 @@
+// Test structures with cyclic references.
+// These can only be handled in pointer/callback mode,
+// see associated .options files.
+
+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;
+}
+