diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2019-06-02 20:36:42 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2019-06-02 20:36:42 -0700 |
commit | 583f24fec1f3773b86168db2d2e4f95f36c3324d (patch) | |
tree | c15ac3932d77d55269eb19ec72b2887b6571ba35 /tests/json | |
parent | 932753d91e183ab25cf1a0f420d9488295002297 (diff) | |
parent | 9f49efef6203973931894a4ed9b862b3e3d639f0 (diff) |
Merge branch 'master' into rmreflective
Diffstat (limited to 'tests/json')
-rw-r--r-- | tests/json/enum_from_separate_file.proto | 9 | ||||
-rw-r--r-- | tests/json/test.proto | 5 | ||||
-rw-r--r-- | tests/json/test.proto.pb | bin | 1883 -> 1958 bytes | |||
-rw-r--r-- | tests/json/test_json.cc | 1 |
4 files changed, 15 insertions, 0 deletions
diff --git a/tests/json/enum_from_separate_file.proto b/tests/json/enum_from_separate_file.proto new file mode 100644 index 0000000..ceb9b42 --- /dev/null +++ b/tests/json/enum_from_separate_file.proto @@ -0,0 +1,9 @@ +syntax = "proto2"; + +import "tests/json/test.proto"; + +package upb.test.json; + +message ImportEnum { + optional MyEnum e = 1; +} diff --git a/tests/json/test.proto b/tests/json/test.proto index e659001..2db0388 100644 --- a/tests/json/test.proto +++ b/tests/json/test.proto @@ -29,6 +29,11 @@ message TestMessage { map<string, int32> map_string_int32 = 23; map<string, bool> map_string_bool = 24; map<string, SubMessage> map_string_msg = 25; + + oneof o { + int32 oneof_int32 = 26; + int64 oneof_int64 = 27; + } } message SubMessage { diff --git a/tests/json/test.proto.pb b/tests/json/test.proto.pb Binary files differindex 5da355d..94b8b92 100644 --- a/tests/json/test.proto.pb +++ b/tests/json/test.proto.pb diff --git a/tests/json/test_json.cc b/tests/json/test_json.cc index 3fddfb6..6650817 100644 --- a/tests/json/test_json.cc +++ b/tests/json/test_json.cc @@ -4,6 +4,7 @@ */ #include "tests/json/test.upbdefs.h" +#include "tests/json/test.upb.h" // Test that it compiles for C++. #include "tests/test_util.h" #include "tests/upb_test.h" #include "upb/handlers.h" |