summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoshua Haberman <jhaberman@gmail.com>2016-09-09 14:59:47 -0700
committerGitHub <noreply@github.com>2016-09-09 14:59:47 -0700
commitb176b976a5f941a73b2247b3ae8473bf1c0c0fa7 (patch)
tree48defe635c420f6056b66bb0b7294e1efdf7d610 /tests
parent0787643281ff264b39bbede82af651770c08eab7 (diff)
parentc387d372ee42d338ca03d91112370c532c6bc574 (diff)
Merge pull request #69 from haberman/oneofdesc
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