aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/tests/generated_code.proto
diff options
context:
space:
mode:
authorGravatar Paul Yang <TeBoring@users.noreply.github.com>2017-12-07 14:18:38 -0800
committerGravatar GitHub <noreply@github.com>2017-12-07 14:18:38 -0800
commit0e7b58956684c7c2fc228eff9173ea2ae50de911 (patch)
treedd44fc86e270993b176a6f315fc2ac67dccda855 /ruby/tests/generated_code.proto
parentc370f88fb18eecc33650ec3ce06f7bdcc11d1596 (diff)
Add discard unknown API in ruby. (#3990)
* Add discard unknown API in ruby. * Add test for oneof message field. * Add TestUnknown to represent unknown field data clearly. * Only serialize the message with unknown fields itself in test. * Move discard_unknown from Message to Google.Protobuf
Diffstat (limited to 'ruby/tests/generated_code.proto')
-rw-r--r--ruby/tests/generated_code.proto13
1 files changed, 13 insertions, 0 deletions
diff --git a/ruby/tests/generated_code.proto b/ruby/tests/generated_code.proto
index 62fd83ed..3b934bd6 100644
--- a/ruby/tests/generated_code.proto
+++ b/ruby/tests/generated_code.proto
@@ -57,6 +57,9 @@ message TestMessage {
}
NestedMessage nested_message = 80;
+
+ // Reserved for non-existing field test.
+ // int32 non_exist = 89;
}
enum TestEnum {
@@ -65,3 +68,13 @@ enum TestEnum {
B = 2;
C = 3;
}
+
+message TestUnknown {
+ TestUnknown optional_unknown = 11;
+ repeated TestUnknown repeated_unknown = 31;
+ oneof my_oneof {
+ TestUnknown oneof_unknown = 51;
+ }
+ map<string, TestUnknown> map_unknown = 67;
+ int32 unknown_field = 89;
+}