From df7234fd8b8779c9973b19b5a8fb22ee2e903982 Mon Sep 17 00:00:00 2001 From: Petteri Aimonen Date: Thu, 28 Aug 2014 21:23:28 +0300 Subject: Fix cyclic messages support in generator. Beginnings of test. Update issue 130 Status: Started --- tests/cyclic_messages/cyclic.proto | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/cyclic_messages/cyclic.proto (limited to 'tests/cyclic_messages/cyclic.proto') 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; +} + -- cgit 1.2.3-korg