From 074a050bb10d9f132c6612260c086e2eb07061b9 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Thu, 8 Sep 2016 19:07:23 -0700 Subject: Added support for loading oneofs from descriptors. --- tests/test.proto | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/test.proto') 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; + } + } } -- cgit v1.2.3