summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2016-09-08 19:07:23 -0700
committerJosh Haberman <jhaberman@gmail.com>2016-09-08 19:07:23 -0700
commit074a050bb10d9f132c6612260c086e2eb07061b9 (patch)
tree67fa2093ad37341ca95880688da8e2222530f0ae /tests
parentdfc409618f2d3684fd7f981461ac31d0b0a28989 (diff)
Added support for loading oneofs from descriptors.
Diffstat (limited to 'tests')
-rw-r--r--tests/test.proto19
-rw-r--r--tests/test.proto.pbbin353 -> 652 bytes
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/test.proto b/tests/test.proto
index 40e185b..e790cbf 100644
--- a/tests/test.proto
+++ b/tests/test.proto
@@ -6,6 +6,8 @@
// ^ |`---|--------^
// +----------+----+ F
+syntax = "proto2";
+
message A {
optional B b = 1;
}
@@ -46,4 +48,21 @@ message SimplePrimitives {
optional sint32 i32 = 7;
optional bool b = 8;
optional string str = 9;
+
+ oneof foo {
+ int32 oneof_int32 = 10;
+ string oneof_string = 11;
+ }
+
+ oneof bar {
+ int64 oneof_int64 = 13;
+ bytes oneof_bytes = 14;
+ }
+
+ message Nested {
+ oneof foo {
+ int32 oneof_int32 = 10;
+ string b = 11;
+ }
+ }
}
diff --git a/tests/test.proto.pb b/tests/test.proto.pb
index 9fc835a..a587fb1 100644
--- a/tests/test.proto.pb
+++ b/tests/test.proto.pb
Binary files differ
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback