protobuf 2.8.13 → 3.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +84 -5
  3. data/CONTRIBUTING.md +3 -3
  4. data/Rakefile +46 -7
  5. data/lib/protobuf/cli.rb +2 -20
  6. data/lib/protobuf/decoder.rb +74 -0
  7. data/lib/protobuf/deprecator.rb +42 -0
  8. data/lib/protobuf/descriptors/google/protobuf/compiler/plugin.pb.rb +17 -16
  9. data/lib/protobuf/descriptors/google/protobuf/descriptor.pb.rb +86 -85
  10. data/lib/protobuf/encoder.rb +62 -0
  11. data/lib/protobuf/enum.rb +298 -37
  12. data/lib/protobuf/field/base_field.rb +41 -27
  13. data/lib/protobuf/field/bool_field.rb +22 -4
  14. data/lib/protobuf/field/bytes_field.rb +36 -15
  15. data/lib/protobuf/field/double_field.rb +10 -3
  16. data/lib/protobuf/field/enum_field.rb +21 -18
  17. data/lib/protobuf/field/field_array.rb +26 -16
  18. data/lib/protobuf/field/fixed32_field.rb +10 -4
  19. data/lib/protobuf/field/fixed64_field.rb +10 -3
  20. data/lib/protobuf/field/float_field.rb +18 -5
  21. data/lib/protobuf/field/int32_field.rb +14 -4
  22. data/lib/protobuf/field/int64_field.rb +14 -4
  23. data/lib/protobuf/field/integer_field.rb +9 -4
  24. data/lib/protobuf/field/message_field.rb +16 -7
  25. data/lib/protobuf/field/sfixed32_field.rb +10 -3
  26. data/lib/protobuf/field/sfixed64_field.rb +12 -7
  27. data/lib/protobuf/field/signed_integer_field.rb +7 -0
  28. data/lib/protobuf/field/sint32_field.rb +14 -4
  29. data/lib/protobuf/field/sint64_field.rb +14 -4
  30. data/lib/protobuf/field/string_field.rb +11 -1
  31. data/lib/protobuf/field/uint32_field.rb +14 -4
  32. data/lib/protobuf/field/uint64_field.rb +14 -4
  33. data/lib/protobuf/field/varint_field.rb +11 -9
  34. data/lib/protobuf/field.rb +42 -25
  35. data/lib/protobuf/generators/enum_generator.rb +12 -1
  36. data/lib/protobuf/generators/field_generator.rb +1 -1
  37. data/lib/protobuf/lifecycle.rb +3 -4
  38. data/lib/protobuf/message/fields.rb +122 -0
  39. data/lib/protobuf/message/serialization.rb +84 -0
  40. data/lib/protobuf/message.rb +21 -221
  41. data/lib/protobuf/optionable.rb +23 -0
  42. data/lib/protobuf/rpc/client.rb +2 -4
  43. data/lib/protobuf/rpc/connector.rb +0 -2
  44. data/lib/protobuf/rpc/connectors/common.rb +2 -2
  45. data/lib/protobuf/rpc/dynamic_discovery.pb.rb +14 -16
  46. data/lib/protobuf/rpc/env.rb +58 -0
  47. data/lib/protobuf/rpc/error.rb +8 -5
  48. data/lib/protobuf/rpc/middleware/exception_handler.rb +36 -0
  49. data/lib/protobuf/rpc/middleware/logger.rb +91 -0
  50. data/lib/protobuf/rpc/middleware/request_decoder.rb +83 -0
  51. data/lib/protobuf/rpc/middleware/response_encoder.rb +88 -0
  52. data/lib/protobuf/rpc/middleware/runner.rb +18 -0
  53. data/lib/protobuf/rpc/middleware.rb +25 -0
  54. data/lib/protobuf/rpc/rpc.pb.rb +15 -16
  55. data/lib/protobuf/rpc/server.rb +14 -64
  56. data/lib/protobuf/rpc/servers/socket/server.rb +0 -2
  57. data/lib/protobuf/rpc/servers/socket/worker.rb +11 -15
  58. data/lib/protobuf/rpc/servers/zmq/util.rb +4 -1
  59. data/lib/protobuf/rpc/servers/zmq/worker.rb +5 -13
  60. data/lib/protobuf/rpc/servers/zmq_runner.rb +1 -1
  61. data/lib/protobuf/rpc/service.rb +38 -72
  62. data/lib/protobuf/rpc/service_dispatcher.rb +20 -108
  63. data/lib/protobuf/version.rb +1 -2
  64. data/lib/protobuf.rb +5 -13
  65. data/protobuf.gemspec +5 -5
  66. data/spec/benchmark/tasks.rb +2 -77
  67. data/spec/functional/zmq_server_spec.rb +13 -21
  68. data/spec/lib/protobuf/cli_spec.rb +5 -43
  69. data/spec/lib/protobuf/enum_spec.rb +194 -61
  70. data/spec/lib/protobuf/field_spec.rb +194 -0
  71. data/spec/lib/protobuf/generators/enum_generator_spec.rb +24 -1
  72. data/spec/lib/protobuf/generators/field_generator_spec.rb +6 -6
  73. data/spec/lib/protobuf/message_spec.rb +52 -70
  74. data/spec/lib/protobuf/optionable_spec.rb +46 -0
  75. data/spec/lib/protobuf/rpc/client_spec.rb +1 -93
  76. data/spec/lib/protobuf/rpc/connector_spec.rb +1 -7
  77. data/spec/lib/protobuf/rpc/connectors/zmq_spec.rb +8 -0
  78. data/spec/lib/protobuf/rpc/middleware/exception_handler_spec.rb +62 -0
  79. data/spec/lib/protobuf/rpc/middleware/logger_spec.rb +49 -0
  80. data/spec/lib/protobuf/rpc/middleware/request_decoder_spec.rb +115 -0
  81. data/spec/lib/protobuf/rpc/middleware/response_encoder_spec.rb +75 -0
  82. data/spec/lib/protobuf/rpc/servers/socket_server_spec.rb +0 -6
  83. data/spec/lib/protobuf/rpc/servers/zmq/util_spec.rb +10 -0
  84. data/spec/lib/protobuf/rpc/service_dispatcher_spec.rb +30 -105
  85. data/spec/lib/protobuf/rpc/service_filters_spec.rb +4 -4
  86. data/spec/lib/protobuf/rpc/service_spec.rb +20 -24
  87. data/spec/lib/protobuf_spec.rb +3 -3
  88. data/spec/spec_helper.rb +5 -4
  89. data/spec/support/packed_field.rb +15 -14
  90. data/spec/support/server.rb +4 -21
  91. data/spec/support/test/defaults.pb.rb +4 -4
  92. data/spec/support/test/enum.pb.rb +13 -1
  93. data/spec/support/test/enum.proto +15 -0
  94. data/spec/support/test/extended.pb.rb +1 -1
  95. data/spec/support/test/google_unittest.pb.rb +239 -241
  96. data/spec/support/test/google_unittest_import.pb.rb +2 -2
  97. data/spec/support/test/multi_field_extensions.pb.rb +2 -2
  98. data/spec/support/test/resource.pb.rb +19 -18
  99. data/spec/support/test/resource.proto +1 -0
  100. data/spec/support/test/resource_service.rb +5 -0
  101. metadata +78 -57
  102. data/bin/rprotoc +0 -8
  103. data/lib/protobuf/enum_value.rb +0 -85
  104. data/lib/protobuf/evented.rb +0 -37
  105. data/lib/protobuf/ext/eventmachine.rb +0 -14
  106. data/lib/protobuf/field/extension_fields.rb +0 -32
  107. data/lib/protobuf/message/decoder.rb +0 -72
  108. data/lib/protobuf/message/message.rb +0 -1
  109. data/lib/protobuf/rpc/connectors/em_client.rb +0 -84
  110. data/lib/protobuf/rpc/connectors/eventmachine.rb +0 -87
  111. data/lib/protobuf/rpc/servers/evented/server.rb +0 -36
  112. data/lib/protobuf/rpc/servers/evented_runner.rb +0 -31
  113. data/spec/functional/embedded_service_spec.rb +0 -7
  114. data/spec/functional/evented_server_spec.rb +0 -64
  115. data/spec/lib/protobuf/enum_value_spec.rb +0 -29
  116. data/spec/lib/protobuf/rpc/servers/evented_server_spec.rb +0 -19
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  ##
4
2
  # This file is auto-generated. DO NOT EDIT!
5
3
  #
@@ -112,205 +110,205 @@ module GoogleUnittest
112
110
  #
113
111
  class TestAllTypes
114
112
  class NestedMessage
115
- optional ::Protobuf::Field::Int32Field, :bb, 1
113
+ optional :int32, :bb, 1
116
114
  end
117
115
 
118
- optional ::Protobuf::Field::Int32Field, :optional_int32, 1
119
- optional ::Protobuf::Field::Int64Field, :optional_int64, 2
120
- optional ::Protobuf::Field::Uint32Field, :optional_uint32, 3
121
- optional ::Protobuf::Field::Uint64Field, :optional_uint64, 4
122
- optional ::Protobuf::Field::Sint32Field, :optional_sint32, 5
123
- optional ::Protobuf::Field::Sint64Field, :optional_sint64, 6
124
- optional ::Protobuf::Field::Fixed32Field, :optional_fixed32, 7
125
- optional ::Protobuf::Field::Fixed64Field, :optional_fixed64, 8
126
- optional ::Protobuf::Field::Sfixed32Field, :optional_sfixed32, 9
127
- optional ::Protobuf::Field::Sfixed64Field, :optional_sfixed64, 10
128
- optional ::Protobuf::Field::FloatField, :optional_float, 11
129
- optional ::Protobuf::Field::DoubleField, :optional_double, 12
130
- optional ::Protobuf::Field::BoolField, :optional_bool, 13
131
- optional ::Protobuf::Field::StringField, :optional_string, 14
132
- optional ::Protobuf::Field::BytesField, :optional_bytes, 15
116
+ optional :int32, :optional_int32, 1
117
+ optional :int64, :optional_int64, 2
118
+ optional :uint32, :optional_uint32, 3
119
+ optional :uint64, :optional_uint64, 4
120
+ optional :sint32, :optional_sint32, 5
121
+ optional :sint64, :optional_sint64, 6
122
+ optional :fixed32, :optional_fixed32, 7
123
+ optional :fixed64, :optional_fixed64, 8
124
+ optional :sfixed32, :optional_sfixed32, 9
125
+ optional :sfixed64, :optional_sfixed64, 10
126
+ optional :float, :optional_float, 11
127
+ optional :double, :optional_double, 12
128
+ optional :bool, :optional_bool, 13
129
+ optional :string, :optional_string, 14
130
+ optional :bytes, :optional_bytes, 15
133
131
  optional ::GoogleUnittest::TestAllTypes::NestedMessage, :optional_nested_message, 18
134
132
  optional ::GoogleUnittest::ForeignMessage, :optional_foreign_message, 19
135
133
  optional ::GoogleUnittestImport::ImportMessage, :optional_import_message, 20
136
134
  optional ::GoogleUnittest::TestAllTypes::NestedEnum, :optional_nested_enum, 21
137
135
  optional ::GoogleUnittest::ForeignEnum, :optional_foreign_enum, 22
138
136
  optional ::GoogleUnittestImport::ImportEnum, :optional_import_enum, 23
139
- optional ::Protobuf::Field::StringField, :optional_string_piece, 24
140
- optional ::Protobuf::Field::StringField, :optional_cord, 25
137
+ optional :string, :optional_string_piece, 24
138
+ optional :string, :optional_cord, 25
141
139
  optional ::GoogleUnittestImport::PublicImportMessage, :optional_public_import_message, 26
142
140
  optional ::GoogleUnittest::TestAllTypes::NestedMessage, :optional_lazy_message, 27
143
- repeated ::Protobuf::Field::Int32Field, :repeated_int32, 31
144
- repeated ::Protobuf::Field::Int64Field, :repeated_int64, 32
145
- repeated ::Protobuf::Field::Uint32Field, :repeated_uint32, 33
146
- repeated ::Protobuf::Field::Uint64Field, :repeated_uint64, 34
147
- repeated ::Protobuf::Field::Sint32Field, :repeated_sint32, 35
148
- repeated ::Protobuf::Field::Sint64Field, :repeated_sint64, 36
149
- repeated ::Protobuf::Field::Fixed32Field, :repeated_fixed32, 37
150
- repeated ::Protobuf::Field::Fixed64Field, :repeated_fixed64, 38
151
- repeated ::Protobuf::Field::Sfixed32Field, :repeated_sfixed32, 39
152
- repeated ::Protobuf::Field::Sfixed64Field, :repeated_sfixed64, 40
153
- repeated ::Protobuf::Field::FloatField, :repeated_float, 41
154
- repeated ::Protobuf::Field::DoubleField, :repeated_double, 42
155
- repeated ::Protobuf::Field::BoolField, :repeated_bool, 43
156
- repeated ::Protobuf::Field::StringField, :repeated_string, 44
157
- repeated ::Protobuf::Field::BytesField, :repeated_bytes, 45
141
+ repeated :int32, :repeated_int32, 31
142
+ repeated :int64, :repeated_int64, 32
143
+ repeated :uint32, :repeated_uint32, 33
144
+ repeated :uint64, :repeated_uint64, 34
145
+ repeated :sint32, :repeated_sint32, 35
146
+ repeated :sint64, :repeated_sint64, 36
147
+ repeated :fixed32, :repeated_fixed32, 37
148
+ repeated :fixed64, :repeated_fixed64, 38
149
+ repeated :sfixed32, :repeated_sfixed32, 39
150
+ repeated :sfixed64, :repeated_sfixed64, 40
151
+ repeated :float, :repeated_float, 41
152
+ repeated :double, :repeated_double, 42
153
+ repeated :bool, :repeated_bool, 43
154
+ repeated :string, :repeated_string, 44
155
+ repeated :bytes, :repeated_bytes, 45
158
156
  repeated ::GoogleUnittest::TestAllTypes::NestedMessage, :repeated_nested_message, 48
159
157
  repeated ::GoogleUnittest::ForeignMessage, :repeated_foreign_message, 49
160
158
  repeated ::GoogleUnittestImport::ImportMessage, :repeated_import_message, 50
161
159
  repeated ::GoogleUnittest::TestAllTypes::NestedEnum, :repeated_nested_enum, 51
162
160
  repeated ::GoogleUnittest::ForeignEnum, :repeated_foreign_enum, 52
163
161
  repeated ::GoogleUnittestImport::ImportEnum, :repeated_import_enum, 53
164
- repeated ::Protobuf::Field::StringField, :repeated_string_piece, 54
165
- repeated ::Protobuf::Field::StringField, :repeated_cord, 55
162
+ repeated :string, :repeated_string_piece, 54
163
+ repeated :string, :repeated_cord, 55
166
164
  repeated ::GoogleUnittest::TestAllTypes::NestedMessage, :repeated_lazy_message, 57
167
- optional ::Protobuf::Field::Int32Field, :default_int32, 61, :default => 41
168
- optional ::Protobuf::Field::Int64Field, :default_int64, 62, :default => 42
169
- optional ::Protobuf::Field::Uint32Field, :default_uint32, 63, :default => 43
170
- optional ::Protobuf::Field::Uint64Field, :default_uint64, 64, :default => 44
171
- optional ::Protobuf::Field::Sint32Field, :default_sint32, 65, :default => -45
172
- optional ::Protobuf::Field::Sint64Field, :default_sint64, 66, :default => 46
173
- optional ::Protobuf::Field::Fixed32Field, :default_fixed32, 67, :default => 47
174
- optional ::Protobuf::Field::Fixed64Field, :default_fixed64, 68, :default => 48
175
- optional ::Protobuf::Field::Sfixed32Field, :default_sfixed32, 69, :default => 49
176
- optional ::Protobuf::Field::Sfixed64Field, :default_sfixed64, 70, :default => -50
177
- optional ::Protobuf::Field::FloatField, :default_float, 71, :default => 51.5
178
- optional ::Protobuf::Field::DoubleField, :default_double, 72, :default => 52000
179
- optional ::Protobuf::Field::BoolField, :default_bool, 73, :default => true
180
- optional ::Protobuf::Field::StringField, :default_string, 74, :default => "hello"
181
- optional ::Protobuf::Field::BytesField, :default_bytes, 75, :default => "world"
165
+ optional :int32, :default_int32, 61, :default => 41
166
+ optional :int64, :default_int64, 62, :default => 42
167
+ optional :uint32, :default_uint32, 63, :default => 43
168
+ optional :uint64, :default_uint64, 64, :default => 44
169
+ optional :sint32, :default_sint32, 65, :default => -45
170
+ optional :sint64, :default_sint64, 66, :default => 46
171
+ optional :fixed32, :default_fixed32, 67, :default => 47
172
+ optional :fixed64, :default_fixed64, 68, :default => 48
173
+ optional :sfixed32, :default_sfixed32, 69, :default => 49
174
+ optional :sfixed64, :default_sfixed64, 70, :default => -50
175
+ optional :float, :default_float, 71, :default => 51.5
176
+ optional :double, :default_double, 72, :default => 52000
177
+ optional :bool, :default_bool, 73, :default => true
178
+ optional :string, :default_string, 74, :default => "hello"
179
+ optional :bytes, :default_bytes, 75, :default => "world"
182
180
  optional ::GoogleUnittest::TestAllTypes::NestedEnum, :default_nested_enum, 81, :default => ::GoogleUnittest::TestAllTypes::NestedEnum::BAR
183
181
  optional ::GoogleUnittest::ForeignEnum, :default_foreign_enum, 82, :default => ::GoogleUnittest::ForeignEnum::FOREIGN_BAR
184
182
  optional ::GoogleUnittestImport::ImportEnum, :default_import_enum, 83, :default => ::GoogleUnittestImport::ImportEnum::IMPORT_BAR
185
- optional ::Protobuf::Field::StringField, :default_string_piece, 84, :default => "abc"
186
- optional ::Protobuf::Field::StringField, :default_cord, 85, :default => "123"
183
+ optional :string, :default_string_piece, 84, :default => "abc"
184
+ optional :string, :default_cord, 85, :default => "123"
187
185
  end
188
186
 
189
187
  class TestDeprecatedFields
190
- optional ::Protobuf::Field::Int32Field, :deprecated_int32, 1, :deprecated => true
188
+ optional :int32, :deprecated_int32, 1, :deprecated => true
191
189
  end
192
190
 
193
191
  class ForeignMessage
194
- optional ::Protobuf::Field::Int32Field, :c, 1
192
+ optional :int32, :c, 1
195
193
  end
196
194
 
197
195
  class TestAllExtensions
198
196
  # Extension Fields
199
197
  extensions 1...536870912
200
- optional ::Protobuf::Field::Int32Field, :optional_int32_extension, 1, :extension => true
201
- optional ::Protobuf::Field::Int64Field, :optional_int64_extension, 2, :extension => true
202
- optional ::Protobuf::Field::Uint32Field, :optional_uint32_extension, 3, :extension => true
203
- optional ::Protobuf::Field::Uint64Field, :optional_uint64_extension, 4, :extension => true
204
- optional ::Protobuf::Field::Sint32Field, :optional_sint32_extension, 5, :extension => true
205
- optional ::Protobuf::Field::Sint64Field, :optional_sint64_extension, 6, :extension => true
206
- optional ::Protobuf::Field::Fixed32Field, :optional_fixed32_extension, 7, :extension => true
207
- optional ::Protobuf::Field::Fixed64Field, :optional_fixed64_extension, 8, :extension => true
208
- optional ::Protobuf::Field::Sfixed32Field, :optional_sfixed32_extension, 9, :extension => true
209
- optional ::Protobuf::Field::Sfixed64Field, :optional_sfixed64_extension, 10, :extension => true
210
- optional ::Protobuf::Field::FloatField, :optional_float_extension, 11, :extension => true
211
- optional ::Protobuf::Field::DoubleField, :optional_double_extension, 12, :extension => true
212
- optional ::Protobuf::Field::BoolField, :optional_bool_extension, 13, :extension => true
213
- optional ::Protobuf::Field::StringField, :optional_string_extension, 14, :extension => true
214
- optional ::Protobuf::Field::BytesField, :optional_bytes_extension, 15, :extension => true
198
+ optional :int32, :optional_int32_extension, 1, :extension => true
199
+ optional :int64, :optional_int64_extension, 2, :extension => true
200
+ optional :uint32, :optional_uint32_extension, 3, :extension => true
201
+ optional :uint64, :optional_uint64_extension, 4, :extension => true
202
+ optional :sint32, :optional_sint32_extension, 5, :extension => true
203
+ optional :sint64, :optional_sint64_extension, 6, :extension => true
204
+ optional :fixed32, :optional_fixed32_extension, 7, :extension => true
205
+ optional :fixed64, :optional_fixed64_extension, 8, :extension => true
206
+ optional :sfixed32, :optional_sfixed32_extension, 9, :extension => true
207
+ optional :sfixed64, :optional_sfixed64_extension, 10, :extension => true
208
+ optional :float, :optional_float_extension, 11, :extension => true
209
+ optional :double, :optional_double_extension, 12, :extension => true
210
+ optional :bool, :optional_bool_extension, 13, :extension => true
211
+ optional :string, :optional_string_extension, 14, :extension => true
212
+ optional :bytes, :optional_bytes_extension, 15, :extension => true
215
213
  optional ::GoogleUnittest::TestAllTypes::NestedMessage, :optional_nested_message_extension, 18, :extension => true
216
214
  optional ::GoogleUnittest::ForeignMessage, :optional_foreign_message_extension, 19, :extension => true
217
215
  optional ::GoogleUnittestImport::ImportMessage, :optional_import_message_extension, 20, :extension => true
218
216
  optional ::GoogleUnittest::TestAllTypes::NestedEnum, :optional_nested_enum_extension, 21, :extension => true
219
217
  optional ::GoogleUnittest::ForeignEnum, :optional_foreign_enum_extension, 22, :extension => true
220
218
  optional ::GoogleUnittestImport::ImportEnum, :optional_import_enum_extension, 23, :extension => true
221
- optional ::Protobuf::Field::StringField, :optional_string_piece_extension, 24, :extension => true
222
- optional ::Protobuf::Field::StringField, :optional_cord_extension, 25, :extension => true
219
+ optional :string, :optional_string_piece_extension, 24, :extension => true
220
+ optional :string, :optional_cord_extension, 25, :extension => true
223
221
  optional ::GoogleUnittestImport::PublicImportMessage, :optional_public_import_message_extension, 26, :extension => true
224
222
  optional ::GoogleUnittest::TestAllTypes::NestedMessage, :optional_lazy_message_extension, 27, :extension => true
225
- repeated ::Protobuf::Field::Int32Field, :repeated_int32_extension, 31, :extension => true
226
- repeated ::Protobuf::Field::Int64Field, :repeated_int64_extension, 32, :extension => true
227
- repeated ::Protobuf::Field::Uint32Field, :repeated_uint32_extension, 33, :extension => true
228
- repeated ::Protobuf::Field::Uint64Field, :repeated_uint64_extension, 34, :extension => true
229
- repeated ::Protobuf::Field::Sint32Field, :repeated_sint32_extension, 35, :extension => true
230
- repeated ::Protobuf::Field::Sint64Field, :repeated_sint64_extension, 36, :extension => true
231
- repeated ::Protobuf::Field::Fixed32Field, :repeated_fixed32_extension, 37, :extension => true
232
- repeated ::Protobuf::Field::Fixed64Field, :repeated_fixed64_extension, 38, :extension => true
233
- repeated ::Protobuf::Field::Sfixed32Field, :repeated_sfixed32_extension, 39, :extension => true
234
- repeated ::Protobuf::Field::Sfixed64Field, :repeated_sfixed64_extension, 40, :extension => true
235
- repeated ::Protobuf::Field::FloatField, :repeated_float_extension, 41, :extension => true
236
- repeated ::Protobuf::Field::DoubleField, :repeated_double_extension, 42, :extension => true
237
- repeated ::Protobuf::Field::BoolField, :repeated_bool_extension, 43, :extension => true
238
- repeated ::Protobuf::Field::StringField, :repeated_string_extension, 44, :extension => true
239
- repeated ::Protobuf::Field::BytesField, :repeated_bytes_extension, 45, :extension => true
223
+ repeated :int32, :repeated_int32_extension, 31, :extension => true
224
+ repeated :int64, :repeated_int64_extension, 32, :extension => true
225
+ repeated :uint32, :repeated_uint32_extension, 33, :extension => true
226
+ repeated :uint64, :repeated_uint64_extension, 34, :extension => true
227
+ repeated :sint32, :repeated_sint32_extension, 35, :extension => true
228
+ repeated :sint64, :repeated_sint64_extension, 36, :extension => true
229
+ repeated :fixed32, :repeated_fixed32_extension, 37, :extension => true
230
+ repeated :fixed64, :repeated_fixed64_extension, 38, :extension => true
231
+ repeated :sfixed32, :repeated_sfixed32_extension, 39, :extension => true
232
+ repeated :sfixed64, :repeated_sfixed64_extension, 40, :extension => true
233
+ repeated :float, :repeated_float_extension, 41, :extension => true
234
+ repeated :double, :repeated_double_extension, 42, :extension => true
235
+ repeated :bool, :repeated_bool_extension, 43, :extension => true
236
+ repeated :string, :repeated_string_extension, 44, :extension => true
237
+ repeated :bytes, :repeated_bytes_extension, 45, :extension => true
240
238
  repeated ::GoogleUnittest::TestAllTypes::NestedMessage, :repeated_nested_message_extension, 48, :extension => true
241
239
  repeated ::GoogleUnittest::ForeignMessage, :repeated_foreign_message_extension, 49, :extension => true
242
240
  repeated ::GoogleUnittestImport::ImportMessage, :repeated_import_message_extension, 50, :extension => true
243
241
  repeated ::GoogleUnittest::TestAllTypes::NestedEnum, :repeated_nested_enum_extension, 51, :extension => true
244
242
  repeated ::GoogleUnittest::ForeignEnum, :repeated_foreign_enum_extension, 52, :extension => true
245
243
  repeated ::GoogleUnittestImport::ImportEnum, :repeated_import_enum_extension, 53, :extension => true
246
- repeated ::Protobuf::Field::StringField, :repeated_string_piece_extension, 54, :extension => true
247
- repeated ::Protobuf::Field::StringField, :repeated_cord_extension, 55, :extension => true
244
+ repeated :string, :repeated_string_piece_extension, 54, :extension => true
245
+ repeated :string, :repeated_cord_extension, 55, :extension => true
248
246
  repeated ::GoogleUnittest::TestAllTypes::NestedMessage, :repeated_lazy_message_extension, 57, :extension => true
249
- optional ::Protobuf::Field::Int32Field, :default_int32_extension, 61, :default => 41, :extension => true
250
- optional ::Protobuf::Field::Int64Field, :default_int64_extension, 62, :default => 42, :extension => true
251
- optional ::Protobuf::Field::Uint32Field, :default_uint32_extension, 63, :default => 43, :extension => true
252
- optional ::Protobuf::Field::Uint64Field, :default_uint64_extension, 64, :default => 44, :extension => true
253
- optional ::Protobuf::Field::Sint32Field, :default_sint32_extension, 65, :default => -45, :extension => true
254
- optional ::Protobuf::Field::Sint64Field, :default_sint64_extension, 66, :default => 46, :extension => true
255
- optional ::Protobuf::Field::Fixed32Field, :default_fixed32_extension, 67, :default => 47, :extension => true
256
- optional ::Protobuf::Field::Fixed64Field, :default_fixed64_extension, 68, :default => 48, :extension => true
257
- optional ::Protobuf::Field::Sfixed32Field, :default_sfixed32_extension, 69, :default => 49, :extension => true
258
- optional ::Protobuf::Field::Sfixed64Field, :default_sfixed64_extension, 70, :default => -50, :extension => true
259
- optional ::Protobuf::Field::FloatField, :default_float_extension, 71, :default => 51.5, :extension => true
260
- optional ::Protobuf::Field::DoubleField, :default_double_extension, 72, :default => 52000, :extension => true
261
- optional ::Protobuf::Field::BoolField, :default_bool_extension, 73, :default => true, :extension => true
262
- optional ::Protobuf::Field::StringField, :default_string_extension, 74, :default => "hello", :extension => true
263
- optional ::Protobuf::Field::BytesField, :default_bytes_extension, 75, :default => "world", :extension => true
247
+ optional :int32, :default_int32_extension, 61, :default => 41, :extension => true
248
+ optional :int64, :default_int64_extension, 62, :default => 42, :extension => true
249
+ optional :uint32, :default_uint32_extension, 63, :default => 43, :extension => true
250
+ optional :uint64, :default_uint64_extension, 64, :default => 44, :extension => true
251
+ optional :sint32, :default_sint32_extension, 65, :default => -45, :extension => true
252
+ optional :sint64, :default_sint64_extension, 66, :default => 46, :extension => true
253
+ optional :fixed32, :default_fixed32_extension, 67, :default => 47, :extension => true
254
+ optional :fixed64, :default_fixed64_extension, 68, :default => 48, :extension => true
255
+ optional :sfixed32, :default_sfixed32_extension, 69, :default => 49, :extension => true
256
+ optional :sfixed64, :default_sfixed64_extension, 70, :default => -50, :extension => true
257
+ optional :float, :default_float_extension, 71, :default => 51.5, :extension => true
258
+ optional :double, :default_double_extension, 72, :default => 52000, :extension => true
259
+ optional :bool, :default_bool_extension, 73, :default => true, :extension => true
260
+ optional :string, :default_string_extension, 74, :default => "hello", :extension => true
261
+ optional :bytes, :default_bytes_extension, 75, :default => "world", :extension => true
264
262
  optional ::GoogleUnittest::TestAllTypes::NestedEnum, :default_nested_enum_extension, 81, :default => ::GoogleUnittest::TestAllTypes::NestedEnum::BAR, :extension => true
265
263
  optional ::GoogleUnittest::ForeignEnum, :default_foreign_enum_extension, 82, :default => ::GoogleUnittest::ForeignEnum::FOREIGN_BAR, :extension => true
266
264
  optional ::GoogleUnittestImport::ImportEnum, :default_import_enum_extension, 83, :default => ::GoogleUnittestImport::ImportEnum::IMPORT_BAR, :extension => true
267
- optional ::Protobuf::Field::StringField, :default_string_piece_extension, 84, :default => "abc", :extension => true
268
- optional ::Protobuf::Field::StringField, :default_cord_extension, 85, :default => "123", :extension => true
269
- optional ::Protobuf::Field::StringField, :test, 1002, :default => "test", :extension => true
265
+ optional :string, :default_string_piece_extension, 84, :default => "abc", :extension => true
266
+ optional :string, :default_cord_extension, 85, :default => "123", :extension => true
267
+ optional :string, :test, 1002, :default => "test", :extension => true
270
268
  optional ::GoogleUnittest::TestRequired, :single, 1000, :extension => true
271
269
  repeated ::GoogleUnittest::TestRequired, :multi, 1001, :extension => true
272
270
  end
273
271
 
274
272
  class TestRequired
275
- required ::Protobuf::Field::Int32Field, :a, 1
276
- optional ::Protobuf::Field::Int32Field, :dummy2, 2
277
- required ::Protobuf::Field::Int32Field, :b, 3
278
- optional ::Protobuf::Field::Int32Field, :dummy4, 4
279
- optional ::Protobuf::Field::Int32Field, :dummy5, 5
280
- optional ::Protobuf::Field::Int32Field, :dummy6, 6
281
- optional ::Protobuf::Field::Int32Field, :dummy7, 7
282
- optional ::Protobuf::Field::Int32Field, :dummy8, 8
283
- optional ::Protobuf::Field::Int32Field, :dummy9, 9
284
- optional ::Protobuf::Field::Int32Field, :dummy10, 10
285
- optional ::Protobuf::Field::Int32Field, :dummy11, 11
286
- optional ::Protobuf::Field::Int32Field, :dummy12, 12
287
- optional ::Protobuf::Field::Int32Field, :dummy13, 13
288
- optional ::Protobuf::Field::Int32Field, :dummy14, 14
289
- optional ::Protobuf::Field::Int32Field, :dummy15, 15
290
- optional ::Protobuf::Field::Int32Field, :dummy16, 16
291
- optional ::Protobuf::Field::Int32Field, :dummy17, 17
292
- optional ::Protobuf::Field::Int32Field, :dummy18, 18
293
- optional ::Protobuf::Field::Int32Field, :dummy19, 19
294
- optional ::Protobuf::Field::Int32Field, :dummy20, 20
295
- optional ::Protobuf::Field::Int32Field, :dummy21, 21
296
- optional ::Protobuf::Field::Int32Field, :dummy22, 22
297
- optional ::Protobuf::Field::Int32Field, :dummy23, 23
298
- optional ::Protobuf::Field::Int32Field, :dummy24, 24
299
- optional ::Protobuf::Field::Int32Field, :dummy25, 25
300
- optional ::Protobuf::Field::Int32Field, :dummy26, 26
301
- optional ::Protobuf::Field::Int32Field, :dummy27, 27
302
- optional ::Protobuf::Field::Int32Field, :dummy28, 28
303
- optional ::Protobuf::Field::Int32Field, :dummy29, 29
304
- optional ::Protobuf::Field::Int32Field, :dummy30, 30
305
- optional ::Protobuf::Field::Int32Field, :dummy31, 31
306
- optional ::Protobuf::Field::Int32Field, :dummy32, 32
307
- required ::Protobuf::Field::Int32Field, :c, 33
273
+ required :int32, :a, 1
274
+ optional :int32, :dummy2, 2
275
+ required :int32, :b, 3
276
+ optional :int32, :dummy4, 4
277
+ optional :int32, :dummy5, 5
278
+ optional :int32, :dummy6, 6
279
+ optional :int32, :dummy7, 7
280
+ optional :int32, :dummy8, 8
281
+ optional :int32, :dummy9, 9
282
+ optional :int32, :dummy10, 10
283
+ optional :int32, :dummy11, 11
284
+ optional :int32, :dummy12, 12
285
+ optional :int32, :dummy13, 13
286
+ optional :int32, :dummy14, 14
287
+ optional :int32, :dummy15, 15
288
+ optional :int32, :dummy16, 16
289
+ optional :int32, :dummy17, 17
290
+ optional :int32, :dummy18, 18
291
+ optional :int32, :dummy19, 19
292
+ optional :int32, :dummy20, 20
293
+ optional :int32, :dummy21, 21
294
+ optional :int32, :dummy22, 22
295
+ optional :int32, :dummy23, 23
296
+ optional :int32, :dummy24, 24
297
+ optional :int32, :dummy25, 25
298
+ optional :int32, :dummy26, 26
299
+ optional :int32, :dummy27, 27
300
+ optional :int32, :dummy28, 28
301
+ optional :int32, :dummy29, 29
302
+ optional :int32, :dummy30, 30
303
+ optional :int32, :dummy31, 31
304
+ optional :int32, :dummy32, 32
305
+ required :int32, :c, 33
308
306
  end
309
307
 
310
308
  class TestRequiredForeign
311
309
  optional ::GoogleUnittest::TestRequired, :optional_message, 1
312
310
  repeated ::GoogleUnittest::TestRequired, :repeated_message, 2
313
- optional ::Protobuf::Field::Int32Field, :dummy, 3
311
+ optional :int32, :dummy, 3
314
312
  end
315
313
 
316
314
  class TestForeignNested
@@ -318,13 +316,13 @@ module GoogleUnittest
318
316
  end
319
317
 
320
318
  class TestReallyLargeTagNumber
321
- optional ::Protobuf::Field::Int32Field, :a, 1
322
- optional ::Protobuf::Field::Int32Field, :bb, 268435455
319
+ optional :int32, :a, 1
320
+ optional :int32, :bb, 268435455
323
321
  end
324
322
 
325
323
  class TestRecursiveMessage
326
324
  optional ::GoogleUnittest::TestRecursiveMessage, :a, 1
327
- optional ::Protobuf::Field::Int32Field, :i, 2
325
+ optional :int32, :i, 2
328
326
  end
329
327
 
330
328
  class TestMutualRecursionA
@@ -333,11 +331,11 @@ module GoogleUnittest
333
331
 
334
332
  class TestMutualRecursionB
335
333
  optional ::GoogleUnittest::TestMutualRecursionA, :a, 1
336
- optional ::Protobuf::Field::Int32Field, :optional_int32, 2
334
+ optional :int32, :optional_int32, 2
337
335
  end
338
336
 
339
337
  class TestDupFieldNumber
340
- optional ::Protobuf::Field::Int32Field, :a, 1
338
+ optional :int32, :a, 1
341
339
  end
342
340
 
343
341
  class TestEagerMessage
@@ -350,7 +348,7 @@ module GoogleUnittest
350
348
 
351
349
  class TestNestedMessageHasBits
352
350
  class NestedMessage
353
- repeated ::Protobuf::Field::Int32Field, :nestedmessage_repeated_int32, 1
351
+ repeated :int32, :nestedmessage_repeated_int32, 1
354
352
  repeated ::GoogleUnittest::ForeignMessage, :nestedmessage_repeated_foreignmessage, 2
355
353
  end
356
354
 
@@ -358,58 +356,58 @@ module GoogleUnittest
358
356
  end
359
357
 
360
358
  class TestCamelCaseFieldNames
361
- optional ::Protobuf::Field::Int32Field, :PrimitiveField, 1
362
- optional ::Protobuf::Field::StringField, :StringField, 2
359
+ optional :int32, :PrimitiveField, 1
360
+ optional :string, :StringField, 2
363
361
  optional ::GoogleUnittest::ForeignEnum, :EnumField, 3
364
362
  optional ::GoogleUnittest::ForeignMessage, :MessageField, 4
365
- optional ::Protobuf::Field::StringField, :StringPieceField, 5
366
- optional ::Protobuf::Field::StringField, :CordField, 6
367
- repeated ::Protobuf::Field::Int32Field, :RepeatedPrimitiveField, 7
368
- repeated ::Protobuf::Field::StringField, :RepeatedStringField, 8
363
+ optional :string, :StringPieceField, 5
364
+ optional :string, :CordField, 6
365
+ repeated :int32, :RepeatedPrimitiveField, 7
366
+ repeated :string, :RepeatedStringField, 8
369
367
  repeated ::GoogleUnittest::ForeignEnum, :RepeatedEnumField, 9
370
368
  repeated ::GoogleUnittest::ForeignMessage, :RepeatedMessageField, 10
371
- repeated ::Protobuf::Field::StringField, :RepeatedStringPieceField, 11
372
- repeated ::Protobuf::Field::StringField, :RepeatedCordField, 12
369
+ repeated :string, :RepeatedStringPieceField, 11
370
+ repeated :string, :RepeatedCordField, 12
373
371
  end
374
372
 
375
373
  class TestFieldOrderings
376
- optional ::Protobuf::Field::StringField, :my_string, 11
377
- optional ::Protobuf::Field::Int64Field, :my_int, 1
378
- optional ::Protobuf::Field::FloatField, :my_float, 101
374
+ optional :string, :my_string, 11
375
+ optional :int64, :my_int, 1
376
+ optional :float, :my_float, 101
379
377
  # Extension Fields
380
378
  extensions 2...11
381
379
  extensions 12...101
382
- optional ::Protobuf::Field::StringField, :my_extension_string, 50, :extension => true
383
- optional ::Protobuf::Field::Int32Field, :my_extension_int, 5, :extension => true
380
+ optional :string, :my_extension_string, 50, :extension => true
381
+ optional :int32, :my_extension_int, 5, :extension => true
384
382
  end
385
383
 
386
384
  class TestExtremeDefaultValues
387
- optional ::Protobuf::Field::BytesField, :escaped_bytes, 1, :default => "\000\001\007\010\014\n\r\t\013\\\\'\"\376"
388
- optional ::Protobuf::Field::Uint32Field, :large_uint32, 2, :default => 4294967295
389
- optional ::Protobuf::Field::Uint64Field, :large_uint64, 3, :default => 18446744073709551615
390
- optional ::Protobuf::Field::Int32Field, :small_int32, 4, :default => -2147483647
391
- optional ::Protobuf::Field::Int64Field, :small_int64, 5, :default => -9223372036854775807
392
- optional ::Protobuf::Field::Int32Field, :really_small_int32, 21, :default => -2147483648
393
- optional ::Protobuf::Field::Int64Field, :really_small_int64, 22, :default => -9223372036854775808
394
- optional ::Protobuf::Field::StringField, :utf8_string, 6, :default => "ሴ"
395
- optional ::Protobuf::Field::FloatField, :zero_float, 7, :default => 0
396
- optional ::Protobuf::Field::FloatField, :one_float, 8, :default => 1
397
- optional ::Protobuf::Field::FloatField, :small_float, 9, :default => 1.5
398
- optional ::Protobuf::Field::FloatField, :negative_one_float, 10, :default => -1
399
- optional ::Protobuf::Field::FloatField, :negative_float, 11, :default => -1.5
400
- optional ::Protobuf::Field::FloatField, :large_float, 12, :default => 2e+08
401
- optional ::Protobuf::Field::FloatField, :small_negative_float, 13, :default => -8e-28
402
- optional ::Protobuf::Field::DoubleField, :inf_double, 14, :default => ::Float::INFINITY
403
- optional ::Protobuf::Field::DoubleField, :neg_inf_double, 15, :default => -::Float::INFINITY
404
- optional ::Protobuf::Field::DoubleField, :nan_double, 16, :default => ::Float::NAN
405
- optional ::Protobuf::Field::FloatField, :inf_float, 17, :default => ::Float::INFINITY
406
- optional ::Protobuf::Field::FloatField, :neg_inf_float, 18, :default => -::Float::INFINITY
407
- optional ::Protobuf::Field::FloatField, :nan_float, 19, :default => ::Float::NAN
408
- optional ::Protobuf::Field::StringField, :cpp_trigraph, 20, :default => "? ? ?? ?? ??? ??/ ??-"
409
- optional ::Protobuf::Field::StringField, :string_with_zero, 23, :default => "hello"
410
- optional ::Protobuf::Field::BytesField, :bytes_with_zero, 24, :default => "wor\000ld"
411
- optional ::Protobuf::Field::StringField, :string_piece_with_zero, 25, :default => "abc"
412
- optional ::Protobuf::Field::StringField, :cord_with_zero, 26, :default => "123"
385
+ optional :bytes, :escaped_bytes, 1, :default => "\000\001\007\010\014\n\r\t\013\\\\'\"\376"
386
+ optional :uint32, :large_uint32, 2, :default => 4294967295
387
+ optional :uint64, :large_uint64, 3, :default => 18446744073709551615
388
+ optional :int32, :small_int32, 4, :default => -2147483647
389
+ optional :int64, :small_int64, 5, :default => -9223372036854775807
390
+ optional :int32, :really_small_int32, 21, :default => -2147483648
391
+ optional :int64, :really_small_int64, 22, :default => -9223372036854775808
392
+ optional :string, :utf8_string, 6, :default => "ሴ"
393
+ optional :float, :zero_float, 7, :default => 0
394
+ optional :float, :one_float, 8, :default => 1
395
+ optional :float, :small_float, 9, :default => 1.5
396
+ optional :float, :negative_one_float, 10, :default => -1
397
+ optional :float, :negative_float, 11, :default => -1.5
398
+ optional :float, :large_float, 12, :default => 2e+08
399
+ optional :float, :small_negative_float, 13, :default => -8e-28
400
+ optional :double, :inf_double, 14, :default => ::Float::INFINITY
401
+ optional :double, :neg_inf_double, 15, :default => -::Float::INFINITY
402
+ optional :double, :nan_double, 16, :default => ::Float::NAN
403
+ optional :float, :inf_float, 17, :default => ::Float::INFINITY
404
+ optional :float, :neg_inf_float, 18, :default => -::Float::INFINITY
405
+ optional :float, :nan_float, 19, :default => ::Float::NAN
406
+ optional :string, :cpp_trigraph, 20, :default => "? ? ?? ?? ??? ??/ ??-"
407
+ optional :string, :string_with_zero, 23, :default => "hello"
408
+ optional :bytes, :bytes_with_zero, 24, :default => "wor\000ld"
409
+ optional :string, :string_piece_with_zero, 25, :default => "abc"
410
+ optional :string, :cord_with_zero, 26, :default => "123"
413
411
  end
414
412
 
415
413
  class SparseEnumMessage
@@ -417,95 +415,95 @@ module GoogleUnittest
417
415
  end
418
416
 
419
417
  class OneString
420
- optional ::Protobuf::Field::StringField, :data, 1
418
+ optional :string, :data, 1
421
419
  end
422
420
 
423
421
  class MoreString
424
- repeated ::Protobuf::Field::StringField, :data, 1
422
+ repeated :string, :data, 1
425
423
  end
426
424
 
427
425
  class OneBytes
428
- optional ::Protobuf::Field::BytesField, :data, 1
426
+ optional :bytes, :data, 1
429
427
  end
430
428
 
431
429
  class MoreBytes
432
- repeated ::Protobuf::Field::BytesField, :data, 1
430
+ repeated :bytes, :data, 1
433
431
  end
434
432
 
435
433
  class TestPackedTypes
436
- repeated ::Protobuf::Field::Int32Field, :packed_int32, 90, :packed => true
437
- repeated ::Protobuf::Field::Int64Field, :packed_int64, 91, :packed => true
438
- repeated ::Protobuf::Field::Uint32Field, :packed_uint32, 92, :packed => true
439
- repeated ::Protobuf::Field::Uint64Field, :packed_uint64, 93, :packed => true
440
- repeated ::Protobuf::Field::Sint32Field, :packed_sint32, 94, :packed => true
441
- repeated ::Protobuf::Field::Sint64Field, :packed_sint64, 95, :packed => true
442
- repeated ::Protobuf::Field::Fixed32Field, :packed_fixed32, 96, :packed => true
443
- repeated ::Protobuf::Field::Fixed64Field, :packed_fixed64, 97, :packed => true
444
- repeated ::Protobuf::Field::Sfixed32Field, :packed_sfixed32, 98, :packed => true
445
- repeated ::Protobuf::Field::Sfixed64Field, :packed_sfixed64, 99, :packed => true
446
- repeated ::Protobuf::Field::FloatField, :packed_float, 100, :packed => true
447
- repeated ::Protobuf::Field::DoubleField, :packed_double, 101, :packed => true
448
- repeated ::Protobuf::Field::BoolField, :packed_bool, 102, :packed => true
434
+ repeated :int32, :packed_int32, 90, :packed => true
435
+ repeated :int64, :packed_int64, 91, :packed => true
436
+ repeated :uint32, :packed_uint32, 92, :packed => true
437
+ repeated :uint64, :packed_uint64, 93, :packed => true
438
+ repeated :sint32, :packed_sint32, 94, :packed => true
439
+ repeated :sint64, :packed_sint64, 95, :packed => true
440
+ repeated :fixed32, :packed_fixed32, 96, :packed => true
441
+ repeated :fixed64, :packed_fixed64, 97, :packed => true
442
+ repeated :sfixed32, :packed_sfixed32, 98, :packed => true
443
+ repeated :sfixed64, :packed_sfixed64, 99, :packed => true
444
+ repeated :float, :packed_float, 100, :packed => true
445
+ repeated :double, :packed_double, 101, :packed => true
446
+ repeated :bool, :packed_bool, 102, :packed => true
449
447
  repeated ::GoogleUnittest::ForeignEnum, :packed_enum, 103, :packed => true
450
448
  end
451
449
 
452
450
  class TestUnpackedTypes
453
- repeated ::Protobuf::Field::Int32Field, :unpacked_int32, 90
454
- repeated ::Protobuf::Field::Int64Field, :unpacked_int64, 91
455
- repeated ::Protobuf::Field::Uint32Field, :unpacked_uint32, 92
456
- repeated ::Protobuf::Field::Uint64Field, :unpacked_uint64, 93
457
- repeated ::Protobuf::Field::Sint32Field, :unpacked_sint32, 94
458
- repeated ::Protobuf::Field::Sint64Field, :unpacked_sint64, 95
459
- repeated ::Protobuf::Field::Fixed32Field, :unpacked_fixed32, 96
460
- repeated ::Protobuf::Field::Fixed64Field, :unpacked_fixed64, 97
461
- repeated ::Protobuf::Field::Sfixed32Field, :unpacked_sfixed32, 98
462
- repeated ::Protobuf::Field::Sfixed64Field, :unpacked_sfixed64, 99
463
- repeated ::Protobuf::Field::FloatField, :unpacked_float, 100
464
- repeated ::Protobuf::Field::DoubleField, :unpacked_double, 101
465
- repeated ::Protobuf::Field::BoolField, :unpacked_bool, 102
451
+ repeated :int32, :unpacked_int32, 90
452
+ repeated :int64, :unpacked_int64, 91
453
+ repeated :uint32, :unpacked_uint32, 92
454
+ repeated :uint64, :unpacked_uint64, 93
455
+ repeated :sint32, :unpacked_sint32, 94
456
+ repeated :sint64, :unpacked_sint64, 95
457
+ repeated :fixed32, :unpacked_fixed32, 96
458
+ repeated :fixed64, :unpacked_fixed64, 97
459
+ repeated :sfixed32, :unpacked_sfixed32, 98
460
+ repeated :sfixed64, :unpacked_sfixed64, 99
461
+ repeated :float, :unpacked_float, 100
462
+ repeated :double, :unpacked_double, 101
463
+ repeated :bool, :unpacked_bool, 102
466
464
  repeated ::GoogleUnittest::ForeignEnum, :unpacked_enum, 103
467
465
  end
468
466
 
469
467
  class TestPackedExtensions
470
468
  # Extension Fields
471
469
  extensions 1...536870912
472
- repeated ::Protobuf::Field::Int32Field, :packed_int32_extension, 90, :packed => true, :extension => true
473
- repeated ::Protobuf::Field::Int64Field, :packed_int64_extension, 91, :packed => true, :extension => true
474
- repeated ::Protobuf::Field::Uint32Field, :packed_uint32_extension, 92, :packed => true, :extension => true
475
- repeated ::Protobuf::Field::Uint64Field, :packed_uint64_extension, 93, :packed => true, :extension => true
476
- repeated ::Protobuf::Field::Sint32Field, :packed_sint32_extension, 94, :packed => true, :extension => true
477
- repeated ::Protobuf::Field::Sint64Field, :packed_sint64_extension, 95, :packed => true, :extension => true
478
- repeated ::Protobuf::Field::Fixed32Field, :packed_fixed32_extension, 96, :packed => true, :extension => true
479
- repeated ::Protobuf::Field::Fixed64Field, :packed_fixed64_extension, 97, :packed => true, :extension => true
480
- repeated ::Protobuf::Field::Sfixed32Field, :packed_sfixed32_extension, 98, :packed => true, :extension => true
481
- repeated ::Protobuf::Field::Sfixed64Field, :packed_sfixed64_extension, 99, :packed => true, :extension => true
482
- repeated ::Protobuf::Field::FloatField, :packed_float_extension, 100, :packed => true, :extension => true
483
- repeated ::Protobuf::Field::DoubleField, :packed_double_extension, 101, :packed => true, :extension => true
484
- repeated ::Protobuf::Field::BoolField, :packed_bool_extension, 102, :packed => true, :extension => true
470
+ repeated :int32, :packed_int32_extension, 90, :packed => true, :extension => true
471
+ repeated :int64, :packed_int64_extension, 91, :packed => true, :extension => true
472
+ repeated :uint32, :packed_uint32_extension, 92, :packed => true, :extension => true
473
+ repeated :uint64, :packed_uint64_extension, 93, :packed => true, :extension => true
474
+ repeated :sint32, :packed_sint32_extension, 94, :packed => true, :extension => true
475
+ repeated :sint64, :packed_sint64_extension, 95, :packed => true, :extension => true
476
+ repeated :fixed32, :packed_fixed32_extension, 96, :packed => true, :extension => true
477
+ repeated :fixed64, :packed_fixed64_extension, 97, :packed => true, :extension => true
478
+ repeated :sfixed32, :packed_sfixed32_extension, 98, :packed => true, :extension => true
479
+ repeated :sfixed64, :packed_sfixed64_extension, 99, :packed => true, :extension => true
480
+ repeated :float, :packed_float_extension, 100, :packed => true, :extension => true
481
+ repeated :double, :packed_double_extension, 101, :packed => true, :extension => true
482
+ repeated :bool, :packed_bool_extension, 102, :packed => true, :extension => true
485
483
  repeated ::GoogleUnittest::ForeignEnum, :packed_enum_extension, 103, :packed => true, :extension => true
486
484
  end
487
485
 
488
486
  class TestDynamicExtensions
489
487
  class DynamicMessageType
490
- optional ::Protobuf::Field::Int32Field, :dynamic_field, 2100
488
+ optional :int32, :dynamic_field, 2100
491
489
  end
492
490
 
493
- optional ::Protobuf::Field::Fixed32Field, :scalar_extension, 2000
491
+ optional :fixed32, :scalar_extension, 2000
494
492
  optional ::GoogleUnittest::ForeignEnum, :enum_extension, 2001
495
493
  optional ::GoogleUnittest::TestDynamicExtensions::DynamicEnumType, :dynamic_enum_extension, 2002
496
494
  optional ::GoogleUnittest::ForeignMessage, :message_extension, 2003
497
495
  optional ::GoogleUnittest::TestDynamicExtensions::DynamicMessageType, :dynamic_message_extension, 2004
498
- repeated ::Protobuf::Field::StringField, :repeated_extension, 2005
499
- repeated ::Protobuf::Field::Sint32Field, :packed_extension, 2006, :packed => true
496
+ repeated :string, :repeated_extension, 2005
497
+ repeated :sint32, :packed_extension, 2006, :packed => true
500
498
  end
501
499
 
502
500
  class TestRepeatedScalarDifferentTagSizes
503
- repeated ::Protobuf::Field::Fixed32Field, :repeated_fixed32, 12
504
- repeated ::Protobuf::Field::Int32Field, :repeated_int32, 13
505
- repeated ::Protobuf::Field::Fixed64Field, :repeated_fixed64, 2046
506
- repeated ::Protobuf::Field::Int64Field, :repeated_int64, 2047
507
- repeated ::Protobuf::Field::FloatField, :repeated_float, 262142
508
- repeated ::Protobuf::Field::Uint64Field, :repeated_uint64, 262143
501
+ repeated :fixed32, :repeated_fixed32, 12
502
+ repeated :int32, :repeated_int32, 13
503
+ repeated :fixed64, :repeated_fixed64, 2046
504
+ repeated :int64, :repeated_int64, 2047
505
+ repeated :float, :repeated_float, 262142
506
+ repeated :uint64, :repeated_uint64, 262143
509
507
  end
510
508
 
511
509
  class TestParsingMerge
@@ -527,7 +525,7 @@ module GoogleUnittest
527
525
  end
528
526
 
529
527
  class TestCommentInjectionMessage
530
- optional ::Protobuf::Field::StringField, :a, 1, :default => "*/ <- Neither should this."
528
+ optional :string, :a, 1, :default => "*/ <- Neither should this."
531
529
  end
532
530
 
533
531