Fix cyclic messages support in generator. Beginnings of test.

Update issue 130
Status: Started
This commit is contained in:
Petteri Aimonen
2014-08-28 21:23:28 +03:00
parent 9e866b4853
commit df7234fd8b
5 changed files with 192 additions and 1 deletions

View File

@@ -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;
}