protobuf 3.5.5 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/CHANGES.md +16 -0
- data/lib/protobuf/cli.rb +3 -1
- data/lib/protobuf/enum.rb +1 -0
- data/lib/protobuf/field/base_field.rb +1 -0
- data/lib/protobuf/field/varint_field.rb +16 -1
- data/lib/protobuf/message.rb +6 -7
- data/lib/protobuf/message/serialization.rb +0 -4
- data/lib/protobuf/rpc/connectors/ping.rb +87 -0
- data/lib/protobuf/rpc/connectors/zmq.rb +5 -16
- data/lib/protobuf/version.rb +1 -1
- data/spec/benchmark/tasks.rb +2 -1
- data/spec/encoding/all_types_spec.rb +28 -27
- data/spec/encoding/extreme_values_spec.rb +0 -0
- data/spec/functional/class_inheritance_spec.rb +1 -1
- data/spec/functional/socket_server_spec.rb +1 -1
- data/spec/functional/zmq_server_spec.rb +1 -1
- data/spec/lib/protobuf/field_spec.rb +1 -1
- data/spec/lib/protobuf/generators/base_spec.rb +2 -0
- data/spec/lib/protobuf/message_spec.rb +6 -4
- data/spec/lib/protobuf/rpc/client_spec.rb +1 -1
- data/spec/lib/protobuf/rpc/connectors/ping_spec.rb +69 -0
- data/spec/lib/protobuf/rpc/connectors/zmq_spec.rb +6 -13
- data/spec/lib/protobuf/rpc/servers/socket_server_spec.rb +1 -1
- data/spec/lib/protobuf/rpc/service_spec.rb +1 -1
- data/spec/lib/protobuf_spec.rb +1 -1
- data/spec/spec_helper.rb +5 -7
- data/spec/support/{test → protos}/all_types.data.bin +0 -0
- data/spec/support/{test → protos}/all_types.data.txt +0 -0
- data/spec/support/{test → protos}/enum.pb.rb +1 -1
- data/spec/support/{test → protos}/enum.proto +3 -1
- data/spec/support/{test → protos}/extreme_values.data.bin +0 -0
- data/spec/support/protos/google_unittest.bin +0 -0
- data/spec/support/{test → protos}/google_unittest.pb.rb +318 -77
- data/spec/support/{test → protos}/google_unittest.proto +230 -66
- data/spec/support/{test → protos}/google_unittest_import.pb.rb +13 -6
- data/spec/support/{test → protos}/google_unittest_import.proto +19 -10
- data/spec/support/protos/google_unittest_import_public.pb.rb +24 -0
- data/spec/support/{test → protos}/google_unittest_import_public.proto +8 -5
- data/spec/support/{test → protos}/multi_field_extensions.pb.rb +0 -0
- data/spec/support/{test → protos}/multi_field_extensions.proto +2 -0
- data/spec/support/{test → protos}/resource.pb.rb +0 -0
- data/spec/support/{test → protos}/resource.proto +2 -0
- data/spec/support/{test/resource_service.rb → resource_service.rb} +1 -1
- data/spec/support/server.rb +2 -1
- metadata +111 -160
- data/spec/data/data.bin +0 -3
- data/spec/data/types.bin +0 -0
- data/spec/support/test/defaults.pb.rb +0 -27
- data/spec/support/test/defaults.proto +0 -9
- data/spec/support/test/extended.pb.rb +0 -24
- data/spec/support/test/extended.proto +0 -10
- data/spec/support/test/google_unittest_import_public.pb.rb +0 -10
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
require 'stringio'
|
4
4
|
require 'spec_helper'
|
5
|
+
require PROTOS_PATH.join('resource.pb')
|
6
|
+
require PROTOS_PATH.join('enum.pb')
|
5
7
|
|
6
8
|
RSpec.describe Protobuf::Message do
|
7
9
|
|
@@ -44,12 +46,12 @@ RSpec.describe Protobuf::Message do
|
|
44
46
|
end
|
45
47
|
|
46
48
|
it 'rejects an unknown value when using the constructor' do
|
47
|
-
expect { older_message.new(:enum_field => :HOORAY) }.to raise_error
|
49
|
+
expect { older_message.new(:enum_field => :HOORAY) }.to raise_error(TypeError)
|
48
50
|
end
|
49
51
|
|
50
52
|
it 'rejects an unknown value when the setter' do
|
51
53
|
older = older_message.new
|
52
|
-
expect { older.enum_field = :HOORAY }.to raise_error
|
54
|
+
expect { older.enum_field = :HOORAY }.to raise_error(TypeError)
|
53
55
|
end
|
54
56
|
end
|
55
57
|
|
@@ -61,12 +63,12 @@ RSpec.describe Protobuf::Message do
|
|
61
63
|
end
|
62
64
|
|
63
65
|
it 'rejects an unknown value when using the constructor' do
|
64
|
-
expect { older_message.new(:enum_list => [:HOORAY]) }.to raise_error
|
66
|
+
expect { older_message.new(:enum_list => [:HOORAY]) }.to raise_error(TypeError)
|
65
67
|
end
|
66
68
|
|
67
69
|
it 'rejects an unknown value when the setter' do
|
68
70
|
older = older_message.new
|
69
|
-
expect { older.enum_field = [:HOORAY] }.to raise_error
|
71
|
+
expect { older.enum_field = [:HOORAY] }.to raise_error(TypeError)
|
70
72
|
end
|
71
73
|
end
|
72
74
|
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "protobuf/zmq"
|
3
|
+
|
4
|
+
::RSpec.describe ::Protobuf::Rpc::Connectors::Ping do
|
5
|
+
subject { described_class.new("google.com", 80) }
|
6
|
+
|
7
|
+
let(:host) { "google.com" }
|
8
|
+
let(:port) { 80 }
|
9
|
+
|
10
|
+
describe ".new" do
|
11
|
+
it "assigns host" do
|
12
|
+
expect(subject.host).to eq(host)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "assigns port" do
|
16
|
+
expect(subject.port).to eq(port)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
describe "#online?" do
|
21
|
+
it "closes the socket" do
|
22
|
+
socket = double(:close => nil, :setsockopt => nil)
|
23
|
+
allow(subject).to receive(:tcp_socket).and_return(socket)
|
24
|
+
expect(socket).to receive(:close)
|
25
|
+
expect(subject).to be_online
|
26
|
+
end
|
27
|
+
|
28
|
+
context "when a socket can connect" do
|
29
|
+
let(:socket) { double(:close => nil, :setsockopt => nil) }
|
30
|
+
before { allow(subject).to receive(:tcp_socket).and_return(socket) }
|
31
|
+
|
32
|
+
it "returns true" do
|
33
|
+
expect(subject).to be_online
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
context "when a socket error is raised" do
|
38
|
+
before { allow(subject).to receive(:tcp_socket).and_raise(::Errno::ECONNREFUSED) }
|
39
|
+
|
40
|
+
it "returns false" do
|
41
|
+
expect(subject).to_not be_online
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
context "when a select timeout is fired" do
|
46
|
+
let(:wait_writable_class) { ::Class.new(StandardError) { include ::IO::WaitWritable } }
|
47
|
+
before { expect_any_instance_of(::Socket).to receive(:connect_nonblock).and_raise(wait_writable_class) }
|
48
|
+
|
49
|
+
it "returns false" do
|
50
|
+
expect(::IO).to receive(:select).and_return(false)
|
51
|
+
expect(subject).to_not be_online
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe "#timeout" do
|
57
|
+
it "uses the default value" do
|
58
|
+
expect(subject.timeout).to eq(5)
|
59
|
+
end
|
60
|
+
|
61
|
+
context "when environment variable is set" do
|
62
|
+
before { ::ENV["PB_RPC_PING_PORT_TIMEOUT"] = "1" }
|
63
|
+
|
64
|
+
it "uses the environmet variable" do
|
65
|
+
expect(subject.timeout).to eq(1)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -69,7 +69,7 @@ RSpec.describe ::Protobuf::Rpc::Connectors::Zmq do
|
|
69
69
|
it "raises an error" do
|
70
70
|
allow(service_directory).to receive(:all_listings_for).and_return(listings)
|
71
71
|
allow(subject).to receive(:host_alive?).and_return(false)
|
72
|
-
expect { subject.send(:lookup_server_uri) }.to raise_error
|
72
|
+
expect { subject.send(:lookup_server_uri) }.to raise_error(RuntimeError)
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
@@ -93,24 +93,17 @@ RSpec.describe ::Protobuf::Rpc::Connectors::Zmq do
|
|
93
93
|
|
94
94
|
context "when the PB_RPC_PING_PORT is set" do
|
95
95
|
before do
|
96
|
-
ENV["PB_RPC_PING_PORT"] = "3307"
|
96
|
+
::ENV["PB_RPC_PING_PORT"] = "3307"
|
97
97
|
end
|
98
98
|
|
99
99
|
it "returns true when the connection succeeds" do
|
100
|
-
|
101
|
-
expect(subject.send(:host_alive?, "
|
100
|
+
allow_any_instance_of(::Protobuf::Rpc::Connectors::Ping).to receive(:online?).and_return(true)
|
101
|
+
expect(subject.send(:host_alive?, "huzzah1.com")).to eq(true)
|
102
102
|
end
|
103
103
|
|
104
104
|
it "returns false when the connection fails" do
|
105
|
-
|
106
|
-
expect(subject.send(:host_alive?, "
|
107
|
-
end
|
108
|
-
|
109
|
-
it "closes the socket" do
|
110
|
-
socket = double("TCPSocket", :setsockopt => nil)
|
111
|
-
expect(socket).to receive(:close)
|
112
|
-
expect(TCPSocket).to receive(:new).with("absorbalof.com", 3307).and_return(socket)
|
113
|
-
expect(subject.send(:host_alive?, "absorbalof.com")).to be true
|
105
|
+
allow_any_instance_of(::Protobuf::Rpc::Connectors::Ping).to receive(:online?).and_return(false)
|
106
|
+
expect(subject.send(:host_alive?, "huzzah2.com")).to eq(false)
|
114
107
|
end
|
115
108
|
end
|
116
109
|
end
|
data/spec/lib/protobuf_spec.rb
CHANGED
@@ -9,7 +9,7 @@ RSpec.describe ::Protobuf do
|
|
9
9
|
subject { ::Protobuf.client_host }
|
10
10
|
|
11
11
|
context 'when client_host is not pre-configured' do
|
12
|
-
it { is_expected.to eq
|
12
|
+
it { is_expected.to eq ::Socket.gethostname }
|
13
13
|
end
|
14
14
|
|
15
15
|
context 'when client_host is pre-configured' do
|
data/spec/spec_helper.rb
CHANGED
@@ -3,13 +3,16 @@ require 'rubygems'
|
|
3
3
|
require 'bundler'
|
4
4
|
Bundler.setup :default, :development, :test
|
5
5
|
require 'pry'
|
6
|
+
require 'pathname'
|
6
7
|
|
7
8
|
$LOAD_PATH << ::File.expand_path('../..', __FILE__)
|
8
|
-
|
9
|
+
SUPPORT_PATH = Pathname.new(::File.expand_path('../support', __FILE__))
|
10
|
+
PROTOS_PATH = SUPPORT_PATH.join('protos')
|
11
|
+
$LOAD_PATH << SUPPORT_PATH
|
9
12
|
|
10
13
|
require 'protobuf'
|
11
14
|
require 'protobuf/rpc/server'
|
12
|
-
require
|
15
|
+
require SUPPORT_PATH.join('all')
|
13
16
|
|
14
17
|
$LOAD_PATH << ::File.expand_path("../../lib/protobuf/descriptors", __FILE__)
|
15
18
|
require 'google/protobuf/compiler/plugin.pb'
|
@@ -25,11 +28,6 @@ end
|
|
25
28
|
# Get rid of the deprecation env var if present (messes with specs).
|
26
29
|
ENV.delete("PB_IGNORE_DEPRECATIONS")
|
27
30
|
|
28
|
-
support_proto_glob = File.expand_path('../support/**/*.pb.rb', __FILE__)
|
29
|
-
Dir[support_proto_glob].each { |proto_file| require proto_file }
|
30
|
-
|
31
|
-
RSpec.configure(&:disable_monkey_patching!)
|
32
|
-
|
33
31
|
::Protobuf::Rpc::Client.class_eval do
|
34
32
|
def ==(other)
|
35
33
|
connector.options == other.options && \
|
File without changes
|
File without changes
|
File without changes
|
Binary file
|
@@ -10,9 +10,9 @@ require 'protobuf/rpc/service'
|
|
10
10
|
##
|
11
11
|
# Imports
|
12
12
|
#
|
13
|
-
require '
|
13
|
+
require 'protos/google_unittest_import.pb'
|
14
14
|
|
15
|
-
module
|
15
|
+
module Protobuf_unittest
|
16
16
|
|
17
17
|
##
|
18
18
|
# Enum Classes
|
@@ -23,6 +23,16 @@ module GoogleUnittest
|
|
23
23
|
define :FOREIGN_BAZ, 6
|
24
24
|
end
|
25
25
|
|
26
|
+
class TestEnumWithDupValue < ::Protobuf::Enum
|
27
|
+
set_option :allow_alias
|
28
|
+
|
29
|
+
define :FOO1, 1
|
30
|
+
define :BAR1, 2
|
31
|
+
define :BAZ, 3
|
32
|
+
define :FOO2, 1
|
33
|
+
define :BAR2, 2
|
34
|
+
end
|
35
|
+
|
26
36
|
class TestSparseEnum < ::Protobuf::Enum
|
27
37
|
define :SPARSE_A, 123
|
28
38
|
define :SPARSE_B, 62374
|
@@ -42,15 +52,22 @@ module GoogleUnittest
|
|
42
52
|
define :FOO, 1
|
43
53
|
define :BAR, 2
|
44
54
|
define :BAZ, 3
|
55
|
+
define :NEG, -1
|
45
56
|
end
|
46
57
|
|
47
58
|
class NestedMessage < ::Protobuf::Message; end
|
59
|
+
class OptionalGroup < ::Protobuf::Message; end
|
60
|
+
class RepeatedGroup < ::Protobuf::Message; end
|
48
61
|
|
49
62
|
end
|
50
63
|
|
64
|
+
class NestedTestAllTypes < ::Protobuf::Message; end
|
51
65
|
class TestDeprecatedFields < ::Protobuf::Message; end
|
52
66
|
class ForeignMessage < ::Protobuf::Message; end
|
67
|
+
class TestReservedFields < ::Protobuf::Message; end
|
53
68
|
class TestAllExtensions < ::Protobuf::Message; end
|
69
|
+
class OptionalGroup_extension < ::Protobuf::Message; end
|
70
|
+
class RepeatedGroup_extension < ::Protobuf::Message; end
|
54
71
|
class TestNestedExtension < ::Protobuf::Message; end
|
55
72
|
class TestRequired < ::Protobuf::Message; end
|
56
73
|
class TestRequiredForeign < ::Protobuf::Message; end
|
@@ -62,7 +79,12 @@ module GoogleUnittest
|
|
62
79
|
class TestRecursiveMessage < ::Protobuf::Message; end
|
63
80
|
class TestMutualRecursionA < ::Protobuf::Message; end
|
64
81
|
class TestMutualRecursionB < ::Protobuf::Message; end
|
65
|
-
class TestDupFieldNumber < ::Protobuf::Message
|
82
|
+
class TestDupFieldNumber < ::Protobuf::Message
|
83
|
+
class Foo < ::Protobuf::Message; end
|
84
|
+
class Bar < ::Protobuf::Message; end
|
85
|
+
|
86
|
+
end
|
87
|
+
|
66
88
|
class TestEagerMessage < ::Protobuf::Message; end
|
67
89
|
class TestLazyMessage < ::Protobuf::Message; end
|
68
90
|
class TestNestedMessageHasBits < ::Protobuf::Message
|
@@ -71,16 +93,53 @@ module GoogleUnittest
|
|
71
93
|
end
|
72
94
|
|
73
95
|
class TestCamelCaseFieldNames < ::Protobuf::Message; end
|
74
|
-
class TestFieldOrderings < ::Protobuf::Message
|
96
|
+
class TestFieldOrderings < ::Protobuf::Message
|
97
|
+
class NestedMessage < ::Protobuf::Message; end
|
98
|
+
|
99
|
+
end
|
100
|
+
|
75
101
|
class TestExtremeDefaultValues < ::Protobuf::Message; end
|
76
102
|
class SparseEnumMessage < ::Protobuf::Message; end
|
77
103
|
class OneString < ::Protobuf::Message; end
|
78
104
|
class MoreString < ::Protobuf::Message; end
|
79
105
|
class OneBytes < ::Protobuf::Message; end
|
80
106
|
class MoreBytes < ::Protobuf::Message; end
|
107
|
+
class Int32Message < ::Protobuf::Message; end
|
108
|
+
class Uint32Message < ::Protobuf::Message; end
|
109
|
+
class Int64Message < ::Protobuf::Message; end
|
110
|
+
class Uint64Message < ::Protobuf::Message; end
|
111
|
+
class BoolMessage < ::Protobuf::Message; end
|
112
|
+
class TestOneof < ::Protobuf::Message
|
113
|
+
class FooGroup < ::Protobuf::Message; end
|
114
|
+
|
115
|
+
end
|
116
|
+
|
117
|
+
class TestOneofBackwardsCompatible < ::Protobuf::Message
|
118
|
+
class FooGroup < ::Protobuf::Message; end
|
119
|
+
|
120
|
+
end
|
121
|
+
|
122
|
+
class TestOneof2 < ::Protobuf::Message
|
123
|
+
class NestedEnum < ::Protobuf::Enum
|
124
|
+
define :FOO, 1
|
125
|
+
define :BAR, 2
|
126
|
+
define :BAZ, 3
|
127
|
+
end
|
128
|
+
|
129
|
+
class FooGroup < ::Protobuf::Message; end
|
130
|
+
class NestedMessage < ::Protobuf::Message; end
|
131
|
+
|
132
|
+
end
|
133
|
+
|
134
|
+
class TestRequiredOneof < ::Protobuf::Message
|
135
|
+
class NestedMessage < ::Protobuf::Message; end
|
136
|
+
|
137
|
+
end
|
138
|
+
|
81
139
|
class TestPackedTypes < ::Protobuf::Message; end
|
82
140
|
class TestUnpackedTypes < ::Protobuf::Message; end
|
83
141
|
class TestPackedExtensions < ::Protobuf::Message; end
|
142
|
+
class TestUnpackedExtensions < ::Protobuf::Message; end
|
84
143
|
class TestDynamicExtensions < ::Protobuf::Message
|
85
144
|
class DynamicEnumType < ::Protobuf::Enum
|
86
145
|
define :DYNAMIC_FOO, 2200
|
@@ -94,7 +153,14 @@ module GoogleUnittest
|
|
94
153
|
|
95
154
|
class TestRepeatedScalarDifferentTagSizes < ::Protobuf::Message; end
|
96
155
|
class TestParsingMerge < ::Protobuf::Message
|
97
|
-
class RepeatedFieldsGenerator < ::Protobuf::Message
|
156
|
+
class RepeatedFieldsGenerator < ::Protobuf::Message
|
157
|
+
class Group1 < ::Protobuf::Message; end
|
158
|
+
class Group2 < ::Protobuf::Message; end
|
159
|
+
|
160
|
+
end
|
161
|
+
|
162
|
+
class OptionalGroup < ::Protobuf::Message; end
|
163
|
+
class RepeatedGroup < ::Protobuf::Message; end
|
98
164
|
|
99
165
|
end
|
100
166
|
|
@@ -115,6 +181,14 @@ module GoogleUnittest
|
|
115
181
|
optional :int32, :bb, 1
|
116
182
|
end
|
117
183
|
|
184
|
+
class OptionalGroup
|
185
|
+
optional :int32, :a, 17
|
186
|
+
end
|
187
|
+
|
188
|
+
class RepeatedGroup
|
189
|
+
optional :int32, :a, 47
|
190
|
+
end
|
191
|
+
|
118
192
|
optional :int32, :optional_int32, 1
|
119
193
|
optional :int64, :optional_int64, 2
|
120
194
|
optional :uint32, :optional_uint32, 3
|
@@ -130,16 +204,17 @@ module GoogleUnittest
|
|
130
204
|
optional :bool, :optional_bool, 13
|
131
205
|
optional :string, :optional_string, 14
|
132
206
|
optional :bytes, :optional_bytes, 15
|
133
|
-
optional ::
|
134
|
-
optional ::
|
135
|
-
optional ::
|
136
|
-
optional ::
|
137
|
-
optional ::
|
138
|
-
optional ::
|
207
|
+
optional ::Protobuf_unittest::TestAllTypes::OptionalGroup, :optionalgroup, 16
|
208
|
+
optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :optional_nested_message, 18
|
209
|
+
optional ::Protobuf_unittest::ForeignMessage, :optional_foreign_message, 19
|
210
|
+
optional ::Protobuf_unittest_import::ImportMessage, :optional_import_message, 20
|
211
|
+
optional ::Protobuf_unittest::TestAllTypes::NestedEnum, :optional_nested_enum, 21
|
212
|
+
optional ::Protobuf_unittest::ForeignEnum, :optional_foreign_enum, 22
|
213
|
+
optional ::Protobuf_unittest_import::ImportEnum, :optional_import_enum, 23
|
139
214
|
optional :string, :optional_string_piece, 24
|
140
215
|
optional :string, :optional_cord, 25
|
141
|
-
optional ::
|
142
|
-
optional ::
|
216
|
+
optional ::Protobuf_unittest_import::PublicImportMessage, :optional_public_import_message, 26
|
217
|
+
optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :optional_lazy_message, 27
|
143
218
|
repeated :int32, :repeated_int32, 31
|
144
219
|
repeated :int64, :repeated_int64, 32
|
145
220
|
repeated :uint32, :repeated_uint32, 33
|
@@ -155,15 +230,16 @@ module GoogleUnittest
|
|
155
230
|
repeated :bool, :repeated_bool, 43
|
156
231
|
repeated :string, :repeated_string, 44
|
157
232
|
repeated :bytes, :repeated_bytes, 45
|
158
|
-
repeated ::
|
159
|
-
repeated ::
|
160
|
-
repeated ::
|
161
|
-
repeated ::
|
162
|
-
repeated ::
|
163
|
-
repeated ::
|
233
|
+
repeated ::Protobuf_unittest::TestAllTypes::RepeatedGroup, :repeatedgroup, 46
|
234
|
+
repeated ::Protobuf_unittest::TestAllTypes::NestedMessage, :repeated_nested_message, 48
|
235
|
+
repeated ::Protobuf_unittest::ForeignMessage, :repeated_foreign_message, 49
|
236
|
+
repeated ::Protobuf_unittest_import::ImportMessage, :repeated_import_message, 50
|
237
|
+
repeated ::Protobuf_unittest::TestAllTypes::NestedEnum, :repeated_nested_enum, 51
|
238
|
+
repeated ::Protobuf_unittest::ForeignEnum, :repeated_foreign_enum, 52
|
239
|
+
repeated ::Protobuf_unittest_import::ImportEnum, :repeated_import_enum, 53
|
164
240
|
repeated :string, :repeated_string_piece, 54
|
165
241
|
repeated :string, :repeated_cord, 55
|
166
|
-
repeated ::
|
242
|
+
repeated ::Protobuf_unittest::TestAllTypes::NestedMessage, :repeated_lazy_message, 57
|
167
243
|
optional :int32, :default_int32, 61, :default => 41
|
168
244
|
optional :int64, :default_int64, 62, :default => 42
|
169
245
|
optional :uint32, :default_uint32, 63, :default => 43
|
@@ -179,11 +255,21 @@ module GoogleUnittest
|
|
179
255
|
optional :bool, :default_bool, 73, :default => true
|
180
256
|
optional :string, :default_string, 74, :default => "hello"
|
181
257
|
optional :bytes, :default_bytes, 75, :default => "world"
|
182
|
-
optional ::
|
183
|
-
optional ::
|
184
|
-
optional ::
|
258
|
+
optional ::Protobuf_unittest::TestAllTypes::NestedEnum, :default_nested_enum, 81, :default => ::Protobuf_unittest::TestAllTypes::NestedEnum::BAR
|
259
|
+
optional ::Protobuf_unittest::ForeignEnum, :default_foreign_enum, 82, :default => ::Protobuf_unittest::ForeignEnum::FOREIGN_BAR
|
260
|
+
optional ::Protobuf_unittest_import::ImportEnum, :default_import_enum, 83, :default => ::Protobuf_unittest_import::ImportEnum::IMPORT_BAR
|
185
261
|
optional :string, :default_string_piece, 84, :default => "abc"
|
186
262
|
optional :string, :default_cord, 85, :default => "123"
|
263
|
+
optional :uint32, :oneof_uint32, 111
|
264
|
+
optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :oneof_nested_message, 112
|
265
|
+
optional :string, :oneof_string, 113
|
266
|
+
optional :bytes, :oneof_bytes, 114
|
267
|
+
end
|
268
|
+
|
269
|
+
class NestedTestAllTypes
|
270
|
+
optional ::Protobuf_unittest::NestedTestAllTypes, :child, 1
|
271
|
+
optional ::Protobuf_unittest::TestAllTypes, :payload, 2
|
272
|
+
repeated ::Protobuf_unittest::NestedTestAllTypes, :repeated_child, 3
|
187
273
|
end
|
188
274
|
|
189
275
|
class TestDeprecatedFields
|
@@ -212,16 +298,17 @@ module GoogleUnittest
|
|
212
298
|
optional :bool, :optional_bool_extension, 13, :extension => true
|
213
299
|
optional :string, :optional_string_extension, 14, :extension => true
|
214
300
|
optional :bytes, :optional_bytes_extension, 15, :extension => true
|
215
|
-
optional ::
|
216
|
-
optional ::
|
217
|
-
optional ::
|
218
|
-
optional ::
|
219
|
-
optional ::
|
220
|
-
optional ::
|
301
|
+
optional ::Protobuf_unittest::OptionalGroup_extension, :optionalgroup_extension, 16, :extension => true
|
302
|
+
optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :optional_nested_message_extension, 18, :extension => true
|
303
|
+
optional ::Protobuf_unittest::ForeignMessage, :optional_foreign_message_extension, 19, :extension => true
|
304
|
+
optional ::Protobuf_unittest_import::ImportMessage, :optional_import_message_extension, 20, :extension => true
|
305
|
+
optional ::Protobuf_unittest::TestAllTypes::NestedEnum, :optional_nested_enum_extension, 21, :extension => true
|
306
|
+
optional ::Protobuf_unittest::ForeignEnum, :optional_foreign_enum_extension, 22, :extension => true
|
307
|
+
optional ::Protobuf_unittest_import::ImportEnum, :optional_import_enum_extension, 23, :extension => true
|
221
308
|
optional :string, :optional_string_piece_extension, 24, :extension => true
|
222
309
|
optional :string, :optional_cord_extension, 25, :extension => true
|
223
|
-
optional ::
|
224
|
-
optional ::
|
310
|
+
optional ::Protobuf_unittest_import::PublicImportMessage, :optional_public_import_message_extension, 26, :extension => true
|
311
|
+
optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :optional_lazy_message_extension, 27, :extension => true
|
225
312
|
repeated :int32, :repeated_int32_extension, 31, :extension => true
|
226
313
|
repeated :int64, :repeated_int64_extension, 32, :extension => true
|
227
314
|
repeated :uint32, :repeated_uint32_extension, 33, :extension => true
|
@@ -237,15 +324,16 @@ module GoogleUnittest
|
|
237
324
|
repeated :bool, :repeated_bool_extension, 43, :extension => true
|
238
325
|
repeated :string, :repeated_string_extension, 44, :extension => true
|
239
326
|
repeated :bytes, :repeated_bytes_extension, 45, :extension => true
|
240
|
-
repeated ::
|
241
|
-
repeated ::
|
242
|
-
repeated ::
|
243
|
-
repeated ::
|
244
|
-
repeated ::
|
245
|
-
repeated ::
|
327
|
+
repeated ::Protobuf_unittest::RepeatedGroup_extension, :repeatedgroup_extension, 46, :extension => true
|
328
|
+
repeated ::Protobuf_unittest::TestAllTypes::NestedMessage, :repeated_nested_message_extension, 48, :extension => true
|
329
|
+
repeated ::Protobuf_unittest::ForeignMessage, :repeated_foreign_message_extension, 49, :extension => true
|
330
|
+
repeated ::Protobuf_unittest_import::ImportMessage, :repeated_import_message_extension, 50, :extension => true
|
331
|
+
repeated ::Protobuf_unittest::TestAllTypes::NestedEnum, :repeated_nested_enum_extension, 51, :extension => true
|
332
|
+
repeated ::Protobuf_unittest::ForeignEnum, :repeated_foreign_enum_extension, 52, :extension => true
|
333
|
+
repeated ::Protobuf_unittest_import::ImportEnum, :repeated_import_enum_extension, 53, :extension => true
|
246
334
|
repeated :string, :repeated_string_piece_extension, 54, :extension => true
|
247
335
|
repeated :string, :repeated_cord_extension, 55, :extension => true
|
248
|
-
repeated ::
|
336
|
+
repeated ::Protobuf_unittest::TestAllTypes::NestedMessage, :repeated_lazy_message_extension, 57, :extension => true
|
249
337
|
optional :int32, :default_int32_extension, 61, :default => 41, :extension => true
|
250
338
|
optional :int64, :default_int64_extension, 62, :default => 42, :extension => true
|
251
339
|
optional :uint32, :default_uint32_extension, 63, :default => 43, :extension => true
|
@@ -261,14 +349,27 @@ module GoogleUnittest
|
|
261
349
|
optional :bool, :default_bool_extension, 73, :default => true, :extension => true
|
262
350
|
optional :string, :default_string_extension, 74, :default => "hello", :extension => true
|
263
351
|
optional :bytes, :default_bytes_extension, 75, :default => "world", :extension => true
|
264
|
-
optional ::
|
265
|
-
optional ::
|
266
|
-
optional ::
|
352
|
+
optional ::Protobuf_unittest::TestAllTypes::NestedEnum, :default_nested_enum_extension, 81, :default => ::Protobuf_unittest::TestAllTypes::NestedEnum::BAR, :extension => true
|
353
|
+
optional ::Protobuf_unittest::ForeignEnum, :default_foreign_enum_extension, 82, :default => ::Protobuf_unittest::ForeignEnum::FOREIGN_BAR, :extension => true
|
354
|
+
optional ::Protobuf_unittest_import::ImportEnum, :default_import_enum_extension, 83, :default => ::Protobuf_unittest_import::ImportEnum::IMPORT_BAR, :extension => true
|
267
355
|
optional :string, :default_string_piece_extension, 84, :default => "abc", :extension => true
|
268
356
|
optional :string, :default_cord_extension, 85, :default => "123", :extension => true
|
357
|
+
optional :uint32, :oneof_uint32_extension, 111, :extension => true
|
358
|
+
optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :oneof_nested_message_extension, 112, :extension => true
|
359
|
+
optional :string, :oneof_string_extension, 113, :extension => true
|
360
|
+
optional :bytes, :oneof_bytes_extension, 114, :extension => true
|
269
361
|
optional :string, :test, 1002, :default => "test", :extension => true
|
270
|
-
optional
|
271
|
-
|
362
|
+
optional :string, :nested_string_extension, 1003, :extension => true
|
363
|
+
optional ::Protobuf_unittest::TestRequired, :single, 1000, :extension => true
|
364
|
+
repeated ::Protobuf_unittest::TestRequired, :multi, 1001, :extension => true
|
365
|
+
end
|
366
|
+
|
367
|
+
class OptionalGroup_extension
|
368
|
+
optional :int32, :a, 17
|
369
|
+
end
|
370
|
+
|
371
|
+
class RepeatedGroup_extension
|
372
|
+
optional :int32, :a, 47
|
272
373
|
end
|
273
374
|
|
274
375
|
class TestRequired
|
@@ -308,13 +409,13 @@ module GoogleUnittest
|
|
308
409
|
end
|
309
410
|
|
310
411
|
class TestRequiredForeign
|
311
|
-
optional ::
|
312
|
-
repeated ::
|
412
|
+
optional ::Protobuf_unittest::TestRequired, :optional_message, 1
|
413
|
+
repeated ::Protobuf_unittest::TestRequired, :repeated_message, 2
|
313
414
|
optional :int32, :dummy, 3
|
314
415
|
end
|
315
416
|
|
316
417
|
class TestForeignNested
|
317
|
-
optional ::
|
418
|
+
optional ::Protobuf_unittest::TestAllTypes::NestedMessage, :foreign_nested, 1
|
318
419
|
end
|
319
420
|
|
320
421
|
class TestReallyLargeTagNumber
|
@@ -323,59 +424,75 @@ module GoogleUnittest
|
|
323
424
|
end
|
324
425
|
|
325
426
|
class TestRecursiveMessage
|
326
|
-
optional ::
|
427
|
+
optional ::Protobuf_unittest::TestRecursiveMessage, :a, 1
|
327
428
|
optional :int32, :i, 2
|
328
429
|
end
|
329
430
|
|
330
431
|
class TestMutualRecursionA
|
331
|
-
optional ::
|
432
|
+
optional ::Protobuf_unittest::TestMutualRecursionB, :bb, 1
|
332
433
|
end
|
333
434
|
|
334
435
|
class TestMutualRecursionB
|
335
|
-
optional ::
|
436
|
+
optional ::Protobuf_unittest::TestMutualRecursionA, :a, 1
|
336
437
|
optional :int32, :optional_int32, 2
|
337
438
|
end
|
338
439
|
|
339
440
|
class TestDupFieldNumber
|
441
|
+
class Foo
|
442
|
+
optional :int32, :a, 1
|
443
|
+
end
|
444
|
+
|
445
|
+
class Bar
|
446
|
+
optional :int32, :a, 1
|
447
|
+
end
|
448
|
+
|
340
449
|
optional :int32, :a, 1
|
450
|
+
optional ::Protobuf_unittest::TestDupFieldNumber::Foo, :foo, 2
|
451
|
+
optional ::Protobuf_unittest::TestDupFieldNumber::Bar, :bar, 3
|
341
452
|
end
|
342
453
|
|
343
454
|
class TestEagerMessage
|
344
|
-
optional ::
|
455
|
+
optional ::Protobuf_unittest::TestAllTypes, :sub_message, 1
|
345
456
|
end
|
346
457
|
|
347
458
|
class TestLazyMessage
|
348
|
-
optional ::
|
459
|
+
optional ::Protobuf_unittest::TestAllTypes, :sub_message, 1
|
349
460
|
end
|
350
461
|
|
351
462
|
class TestNestedMessageHasBits
|
352
463
|
class NestedMessage
|
353
464
|
repeated :int32, :nestedmessage_repeated_int32, 1
|
354
|
-
repeated ::
|
465
|
+
repeated ::Protobuf_unittest::ForeignMessage, :nestedmessage_repeated_foreignmessage, 2
|
355
466
|
end
|
356
467
|
|
357
|
-
optional ::
|
468
|
+
optional ::Protobuf_unittest::TestNestedMessageHasBits::NestedMessage, :optional_nested_message, 1
|
358
469
|
end
|
359
470
|
|
360
471
|
class TestCamelCaseFieldNames
|
361
472
|
optional :int32, :PrimitiveField, 1
|
362
473
|
optional :string, :StringField, 2
|
363
|
-
optional ::
|
364
|
-
optional ::
|
474
|
+
optional ::Protobuf_unittest::ForeignEnum, :EnumField, 3
|
475
|
+
optional ::Protobuf_unittest::ForeignMessage, :MessageField, 4
|
365
476
|
optional :string, :StringPieceField, 5
|
366
477
|
optional :string, :CordField, 6
|
367
478
|
repeated :int32, :RepeatedPrimitiveField, 7
|
368
479
|
repeated :string, :RepeatedStringField, 8
|
369
|
-
repeated ::
|
370
|
-
repeated ::
|
480
|
+
repeated ::Protobuf_unittest::ForeignEnum, :RepeatedEnumField, 9
|
481
|
+
repeated ::Protobuf_unittest::ForeignMessage, :RepeatedMessageField, 10
|
371
482
|
repeated :string, :RepeatedStringPieceField, 11
|
372
483
|
repeated :string, :RepeatedCordField, 12
|
373
484
|
end
|
374
485
|
|
375
486
|
class TestFieldOrderings
|
487
|
+
class NestedMessage
|
488
|
+
optional :int64, :oo, 2
|
489
|
+
optional :int32, :bb, 1
|
490
|
+
end
|
491
|
+
|
376
492
|
optional :string, :my_string, 11
|
377
493
|
optional :int64, :my_int, 1
|
378
494
|
optional :float, :my_float, 101
|
495
|
+
optional ::Protobuf_unittest::TestFieldOrderings::NestedMessage, :optional_nested_message, 200
|
379
496
|
# Extension Fields
|
380
497
|
extensions 2...11
|
381
498
|
extensions 12...101
|
@@ -410,10 +527,11 @@ module GoogleUnittest
|
|
410
527
|
optional :bytes, :bytes_with_zero, 24, :default => "wor\000ld"
|
411
528
|
optional :string, :string_piece_with_zero, 25, :default => "abc"
|
412
529
|
optional :string, :cord_with_zero, 26, :default => "123"
|
530
|
+
optional :string, :replacement_string, 27, :default => "${unknown}"
|
413
531
|
end
|
414
532
|
|
415
533
|
class SparseEnumMessage
|
416
|
-
optional ::
|
534
|
+
optional ::Protobuf_unittest::TestSparseEnum, :sparse_enum, 1
|
417
535
|
end
|
418
536
|
|
419
537
|
class OneString
|
@@ -432,6 +550,90 @@ module GoogleUnittest
|
|
432
550
|
repeated :bytes, :data, 1
|
433
551
|
end
|
434
552
|
|
553
|
+
class Int32Message
|
554
|
+
optional :int32, :data, 1
|
555
|
+
end
|
556
|
+
|
557
|
+
class Uint32Message
|
558
|
+
optional :uint32, :data, 1
|
559
|
+
end
|
560
|
+
|
561
|
+
class Int64Message
|
562
|
+
optional :int64, :data, 1
|
563
|
+
end
|
564
|
+
|
565
|
+
class Uint64Message
|
566
|
+
optional :uint64, :data, 1
|
567
|
+
end
|
568
|
+
|
569
|
+
class BoolMessage
|
570
|
+
optional :bool, :data, 1
|
571
|
+
end
|
572
|
+
|
573
|
+
class TestOneof
|
574
|
+
class FooGroup
|
575
|
+
optional :int32, :a, 5
|
576
|
+
optional :string, :b, 6
|
577
|
+
end
|
578
|
+
|
579
|
+
optional :int32, :foo_int, 1
|
580
|
+
optional :string, :foo_string, 2
|
581
|
+
optional ::Protobuf_unittest::TestAllTypes, :foo_message, 3
|
582
|
+
optional ::Protobuf_unittest::TestOneof::FooGroup, :foogroup, 4
|
583
|
+
end
|
584
|
+
|
585
|
+
class TestOneofBackwardsCompatible
|
586
|
+
class FooGroup
|
587
|
+
optional :int32, :a, 5
|
588
|
+
optional :string, :b, 6
|
589
|
+
end
|
590
|
+
|
591
|
+
optional :int32, :foo_int, 1
|
592
|
+
optional :string, :foo_string, 2
|
593
|
+
optional ::Protobuf_unittest::TestAllTypes, :foo_message, 3
|
594
|
+
optional ::Protobuf_unittest::TestOneofBackwardsCompatible::FooGroup, :foogroup, 4
|
595
|
+
end
|
596
|
+
|
597
|
+
class TestOneof2
|
598
|
+
class FooGroup
|
599
|
+
optional :int32, :a, 9
|
600
|
+
optional :string, :b, 10
|
601
|
+
end
|
602
|
+
|
603
|
+
class NestedMessage
|
604
|
+
optional :int64, :qux_int, 1
|
605
|
+
repeated :int32, :corge_int, 2
|
606
|
+
end
|
607
|
+
|
608
|
+
optional :int32, :foo_int, 1
|
609
|
+
optional :string, :foo_string, 2
|
610
|
+
optional :string, :foo_cord, 3
|
611
|
+
optional :string, :foo_string_piece, 4
|
612
|
+
optional :bytes, :foo_bytes, 5
|
613
|
+
optional ::Protobuf_unittest::TestOneof2::NestedEnum, :foo_enum, 6
|
614
|
+
optional ::Protobuf_unittest::TestOneof2::NestedMessage, :foo_message, 7
|
615
|
+
optional ::Protobuf_unittest::TestOneof2::FooGroup, :foogroup, 8
|
616
|
+
optional ::Protobuf_unittest::TestOneof2::NestedMessage, :foo_lazy_message, 11
|
617
|
+
optional :int32, :bar_int, 12, :default => 5
|
618
|
+
optional :string, :bar_string, 13, :default => "STRING"
|
619
|
+
optional :string, :bar_cord, 14, :default => "CORD"
|
620
|
+
optional :string, :bar_string_piece, 15, :default => "SPIECE"
|
621
|
+
optional :bytes, :bar_bytes, 16, :default => "BYTES"
|
622
|
+
optional ::Protobuf_unittest::TestOneof2::NestedEnum, :bar_enum, 17, :default => ::Protobuf_unittest::TestOneof2::NestedEnum::BAR
|
623
|
+
optional :int32, :baz_int, 18
|
624
|
+
optional :string, :baz_string, 19, :default => "BAZ"
|
625
|
+
end
|
626
|
+
|
627
|
+
class TestRequiredOneof
|
628
|
+
class NestedMessage
|
629
|
+
required :double, :required_double, 1
|
630
|
+
end
|
631
|
+
|
632
|
+
optional :int32, :foo_int, 1
|
633
|
+
optional :string, :foo_string, 2
|
634
|
+
optional ::Protobuf_unittest::TestRequiredOneof::NestedMessage, :foo_message, 3
|
635
|
+
end
|
636
|
+
|
435
637
|
class TestPackedTypes
|
436
638
|
repeated :int32, :packed_int32, 90, :packed => true
|
437
639
|
repeated :int64, :packed_int64, 91, :packed => true
|
@@ -446,7 +648,7 @@ module GoogleUnittest
|
|
446
648
|
repeated :float, :packed_float, 100, :packed => true
|
447
649
|
repeated :double, :packed_double, 101, :packed => true
|
448
650
|
repeated :bool, :packed_bool, 102, :packed => true
|
449
|
-
repeated ::
|
651
|
+
repeated ::Protobuf_unittest::ForeignEnum, :packed_enum, 103, :packed => true
|
450
652
|
end
|
451
653
|
|
452
654
|
class TestUnpackedTypes
|
@@ -463,7 +665,7 @@ module GoogleUnittest
|
|
463
665
|
repeated :float, :unpacked_float, 100
|
464
666
|
repeated :double, :unpacked_double, 101
|
465
667
|
repeated :bool, :unpacked_bool, 102
|
466
|
-
repeated ::
|
668
|
+
repeated ::Protobuf_unittest::ForeignEnum, :unpacked_enum, 103
|
467
669
|
end
|
468
670
|
|
469
671
|
class TestPackedExtensions
|
@@ -482,7 +684,26 @@ module GoogleUnittest
|
|
482
684
|
repeated :float, :packed_float_extension, 100, :packed => true, :extension => true
|
483
685
|
repeated :double, :packed_double_extension, 101, :packed => true, :extension => true
|
484
686
|
repeated :bool, :packed_bool_extension, 102, :packed => true, :extension => true
|
485
|
-
repeated ::
|
687
|
+
repeated ::Protobuf_unittest::ForeignEnum, :packed_enum_extension, 103, :packed => true, :extension => true
|
688
|
+
end
|
689
|
+
|
690
|
+
class TestUnpackedExtensions
|
691
|
+
# Extension Fields
|
692
|
+
extensions 1...536870912
|
693
|
+
repeated :int32, :unpacked_int32_extension, 90, :extension => true
|
694
|
+
repeated :int64, :unpacked_int64_extension, 91, :extension => true
|
695
|
+
repeated :uint32, :unpacked_uint32_extension, 92, :extension => true
|
696
|
+
repeated :uint64, :unpacked_uint64_extension, 93, :extension => true
|
697
|
+
repeated :sint32, :unpacked_sint32_extension, 94, :extension => true
|
698
|
+
repeated :sint64, :unpacked_sint64_extension, 95, :extension => true
|
699
|
+
repeated :fixed32, :unpacked_fixed32_extension, 96, :extension => true
|
700
|
+
repeated :fixed64, :unpacked_fixed64_extension, 97, :extension => true
|
701
|
+
repeated :sfixed32, :unpacked_sfixed32_extension, 98, :extension => true
|
702
|
+
repeated :sfixed64, :unpacked_sfixed64_extension, 99, :extension => true
|
703
|
+
repeated :float, :unpacked_float_extension, 100, :extension => true
|
704
|
+
repeated :double, :unpacked_double_extension, 101, :extension => true
|
705
|
+
repeated :bool, :unpacked_bool_extension, 102, :extension => true
|
706
|
+
repeated ::Protobuf_unittest::ForeignEnum, :unpacked_enum_extension, 103, :extension => true
|
486
707
|
end
|
487
708
|
|
488
709
|
class TestDynamicExtensions
|
@@ -491,10 +712,10 @@ module GoogleUnittest
|
|
491
712
|
end
|
492
713
|
|
493
714
|
optional :fixed32, :scalar_extension, 2000
|
494
|
-
optional ::
|
495
|
-
optional ::
|
496
|
-
optional ::
|
497
|
-
optional ::
|
715
|
+
optional ::Protobuf_unittest::ForeignEnum, :enum_extension, 2001
|
716
|
+
optional ::Protobuf_unittest::TestDynamicExtensions::DynamicEnumType, :dynamic_enum_extension, 2002
|
717
|
+
optional ::Protobuf_unittest::ForeignMessage, :message_extension, 2003
|
718
|
+
optional ::Protobuf_unittest::TestDynamicExtensions::DynamicMessageType, :dynamic_message_extension, 2004
|
498
719
|
repeated :string, :repeated_extension, 2005
|
499
720
|
repeated :sint32, :packed_extension, 2006, :packed => true
|
500
721
|
end
|
@@ -510,20 +731,40 @@ module GoogleUnittest
|
|
510
731
|
|
511
732
|
class TestParsingMerge
|
512
733
|
class RepeatedFieldsGenerator
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
734
|
+
class Group1
|
735
|
+
optional ::Protobuf_unittest::TestAllTypes, :field1, 11
|
736
|
+
end
|
737
|
+
|
738
|
+
class Group2
|
739
|
+
optional ::Protobuf_unittest::TestAllTypes, :field1, 21
|
740
|
+
end
|
741
|
+
|
742
|
+
repeated ::Protobuf_unittest::TestAllTypes, :field1, 1
|
743
|
+
repeated ::Protobuf_unittest::TestAllTypes, :field2, 2
|
744
|
+
repeated ::Protobuf_unittest::TestAllTypes, :field3, 3
|
745
|
+
repeated ::Protobuf_unittest::TestParsingMerge::RepeatedFieldsGenerator::Group1, :group1, 10
|
746
|
+
repeated ::Protobuf_unittest::TestParsingMerge::RepeatedFieldsGenerator::Group2, :group2, 20
|
747
|
+
repeated ::Protobuf_unittest::TestAllTypes, :ext1, 1000
|
748
|
+
repeated ::Protobuf_unittest::TestAllTypes, :ext2, 1001
|
749
|
+
end
|
750
|
+
|
751
|
+
class OptionalGroup
|
752
|
+
optional ::Protobuf_unittest::TestAllTypes, :optional_group_all_types, 11
|
753
|
+
end
|
754
|
+
|
755
|
+
class RepeatedGroup
|
756
|
+
optional ::Protobuf_unittest::TestAllTypes, :repeated_group_all_types, 21
|
518
757
|
end
|
519
758
|
|
520
|
-
required ::
|
521
|
-
optional ::
|
522
|
-
repeated ::
|
759
|
+
required ::Protobuf_unittest::TestAllTypes, :required_all_types, 1
|
760
|
+
optional ::Protobuf_unittest::TestAllTypes, :optional_all_types, 2
|
761
|
+
repeated ::Protobuf_unittest::TestAllTypes, :repeated_all_types, 3
|
762
|
+
optional ::Protobuf_unittest::TestParsingMerge::OptionalGroup, :optionalgroup, 10
|
763
|
+
repeated ::Protobuf_unittest::TestParsingMerge::RepeatedGroup, :repeatedgroup, 20
|
523
764
|
# Extension Fields
|
524
765
|
extensions 1000...536870912
|
525
|
-
optional ::
|
526
|
-
repeated ::
|
766
|
+
optional ::Protobuf_unittest::TestAllTypes, :optional_ext, 1000, :extension => true
|
767
|
+
repeated ::Protobuf_unittest::TestAllTypes, :repeated_ext, 1001, :extension => true
|
527
768
|
end
|
528
769
|
|
529
770
|
class TestCommentInjectionMessage
|
@@ -535,8 +776,8 @@ module GoogleUnittest
|
|
535
776
|
# Service Classes
|
536
777
|
#
|
537
778
|
class TestService < ::Protobuf::Rpc::Service
|
538
|
-
rpc :foo, ::
|
539
|
-
rpc :bar, ::
|
779
|
+
rpc :foo, ::Protobuf_unittest::FooRequest, ::Protobuf_unittest::FooResponse
|
780
|
+
rpc :bar, ::Protobuf_unittest::BarRequest, ::Protobuf_unittest::BarResponse
|
540
781
|
end
|
541
782
|
|
542
783
|
end
|