summaryrefslogtreecommitdiff
path: root/tests/test.proto
diff options
context:
space:
mode:
authorJoshua Haberman <joshua@reverberate.org>2009-12-06 13:41:37 -0800
committerJoshua Haberman <joshua@reverberate.org>2009-12-06 13:41:37 -0800
commite15f834a916d64b80a0da9cdc4ee0bd4439b6bf4 (patch)
treeabd7dd38ceabf6aa75059551a0d339f6ed45cced /tests/test.proto
parent08b4a91204ff7174c381f887d87878d8bb1181ff (diff)
Circular references truly work now, along with a test.
One simplification to come.
Diffstat (limited to 'tests/test.proto')
-rw-r--r--tests/test.proto31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/test.proto b/tests/test.proto
new file mode 100644
index 0000000..b51bd6b
--- /dev/null
+++ b/tests/test.proto
@@ -0,0 +1,31 @@
+
+// A series of messages with various kinds of cycles in them.
+// +-+---+ +---+
+// V | | | |
+// A -> B-+-> C -> D<--+
+// ^ | |
+// +----------+----+
+//
+// This tests the following cases:
+// - B and C are together in multiple cycles
+// - B and D are cycles to themselves.
+
+message A {
+ optional B b = 1;
+}
+
+message B {
+ optional B b = 1;
+ optional C c = 2;
+}
+
+message C {
+ optional A a = 1;
+ optional B b = 2;
+ optional D d = 3;
+}
+
+message D {
+ optional A a = 1;
+ optional D d = 2;
+}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback