summaryrefslogtreecommitdiff
path: root/tests/test.proto
blob: 40e185baf1b1ebcf8e3bd321e8c1feb89a3c1b8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

// A series of messages with various kinds of cycles in them.
//      +-+---+    +---+    +---+
//      V |   |    V   |    V   |
// A -> B-+-> C -> D---+--->E---+
// ^          |`---|--------^
// +----------+----+        F

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;
  optional E e = 4;
}

message D {
  optional A a = 1;
  optional D d = 2;
  optional E e = 3;
}

message E {
  optional E e = 1;
}

message F {
  optional E e = 1;
}

// A proto with a bunch of simple primitives.
message SimplePrimitives {
  optional fixed64 u64 = 1;
  optional fixed32 u32 = 2;
  optional double dbl = 3;
  optional float flt = 5;
  optional sint64 i64 = 6;
  optional sint32 i32 = 7;
  optional bool b = 8;
  optional string str = 9;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback