/third_party/protobuf/ruby/tests/ |
H A D | type_errors.rb | 17 A::B::C::TestMessage.new(optional_string: 4) 21 A::B::C::TestMessage.new(oneof_string: 4) 25 A::B::C::TestMessage.new(repeated_string: '4') 32 A::B::C::TestMessage.new(optional_float: true) 36 A::B::C::TestMessage.new(oneof_float: true) 40 A::B::C::TestMessage.new(repeated_float: 'true') 47 A::B::C::TestMessage.new(optional_double: :double) 51 A::B::C::TestMessage.new(oneof_double: :double) 55 A::B::C::TestMessage.new(repeated_double: false) 62 A::B::C::TestMessage [all...] |
H A D | encode_decode_test.rb | 18 m = A::B::C::TestMessage.decode(from) 20 to = A::B::C::TestMessage.encode(m) 28 m = A::B::C::TestMessage.decode(from) 30 to = A::B::C::TestMessage.encode(m.optional_msg) 38 m = A::B::C::TestMessage.decode(from) 40 to = A::B::C::TestMessage.encode(m.repeated_msg[0]) 48 m = A::B::C::TestMessage.decode(from) 50 to = A::B::C::TestMessage.encode(m.map_string_msg['']) 58 m = A::B::C::TestMessage.decode(from) 60 to = A::B::C::TestMessage [all...] |
H A D | repeated_field_test.rb | 9 m = TestMessage.new 10 (Enumerable.instance_methods - TestMessage.new.repeated_string.methods).each do |method_name| 16 m = TestMessage.new 17 arr_methods = ([].methods - TestMessage.new.repeated_string.methods) 30 m = TestMessage.new 31 repeated_field_names(TestMessage).each do |field_name| 58 m = TestMessage.new 59 repeated_field_names(TestMessage).each do |field_name| 78 m = TestMessage.new 79 repeated_field_names(TestMessage) [all...] |
H A D | gc_test.rb | 18 A::B::C::TestMessage.new( 29 :optional_msg => A::B::C::TestMessage.new(), 40 :repeated_msg => [A::B::C::TestMessage.new()], 47 :map_string_msg => {"a" => A::B::C::TestMessage.new()}, 54 A::B::Proto2::TestMessage.new( 65 :optional_msg => A::B::Proto2::TestMessage.new(), 76 :repeated_msg => [A::B::Proto2::TestMessage.new()], 87 :required_msg => A::B::Proto2::TestMessage.new(), 95 data = A::B::C::TestMessage.encode(from) 96 to = A::B::C::TestMessage [all...] |
H A D | basic_proto2.rb | 37 m = TestMessage.new 39 assert !TestMessage.descriptor.lookup('optional_int32').has?(m) 41 assert !TestMessage.descriptor.lookup('optional_int64').has?(m) 43 assert !TestMessage.descriptor.lookup('optional_uint32').has?(m) 45 assert !TestMessage.descriptor.lookup('optional_uint64').has?(m) 47 assert !TestMessage.descriptor.lookup('optional_bool').has?(m) 49 assert !TestMessage.descriptor.lookup('optional_float').has?(m) 51 assert !TestMessage.descriptor.lookup('optional_double').has?(m) 53 assert !TestMessage.descriptor.lookup('optional_string').has?(m) 55 assert !TestMessage [all...] |
H A D | common_tests.rb | 16 m = proto_module::TestMessage.new 31 m = proto_module::TestMessage.new 63 m = proto_module::TestMessage.new(:optional_int32 => -42, 77 m = proto_module::TestMessage.new(:optional_enum => 'C', :repeated_enum => ['A', 'B']) 81 m = proto_module::TestMessage.new(:optional_string => :foo, :repeated_string => [:foo, :bar]) 87 m = proto_module::TestMessage.new(:optional_enum => nil, :optional_int32 => nil, :optional_string => nil, :optional_msg => nil) 115 m = proto_module::TestMessage.new( 120 expected = "<#{proto_module}::TestMessage: optional_int32: -42, optional_int64: 0, optional_uint32: 0, optional_uint64: 0, optional_bool: false, optional_float: 0.0, optional_double: 0.0, optional_string: \"\", optional_bytes: \"\", optional_msg: <#{proto_module}::TestMessage2: foo: 0>, optional_enum: :A, repeated_int32: [], repeated_int64: [], repeated_uint32: [], repeated_uint64: [], repeated_bool: [], repeated_float: [], repeated_double: [], repeated_string: [\"hello\", \"there\", \"world\"], repeated_bytes: [], repeated_msg: [], repeated_enum: []>" 131 m1 = proto_module::TestMessage.new(:optional_int32 => 42) 132 m2 = proto_module::TestMessage [all...] |
H A D | stress.rb | 9 add_message "TestMessage" do 18 TestMessage = pool.lookup("TestMessage").msgclass 23 TestMessage.new(:a => 1000, 29 data = TestMessage.encode(m) 31 mnew = TestMessage.decode(data) 34 assert TestMessage.encode(mnew) == data
|
/third_party/protobuf/php/tests/ |
H A D | memory_leak_test.php | 30 require_once('generated/Foo/TestMessage.php'); 31 require_once('generated/Foo/TestMessage/PBEmpty.php'); 32 require_once('generated/Foo/TestMessage/NestedEnum.php'); 33 require_once('generated/Foo/TestMessage/Sub.php'); 61 use Foo\TestMessage; 62 use Foo\TestMessage\Sub; 64 $from = new TestMessage(); 70 $to = new TestMessage(); 75 $from = new TestMessage(); 85 $arr = new RepeatedField(GPBType::MESSAGE, TestMessage [all...] |
H A D | EncodeDecodeTest.php | 17 use Foo\TestMessage; 18 use Foo\TestMessage\Sub; 42 $m = new TestMessage(); 231 $from = new TestMessage(); 243 $to = new TestMessage(); 250 $from = new TestMessage(); 257 $to = new TestMessage(); 264 $from = new TestMessage(); 269 $to = new TestMessage(); 276 $m = new TestMessage(); [all...] |
H A D | undefined_test.php | 7 use Foo\TestMessage; 8 use Foo\TestMessage\Sub; 344 $arr[] = new TestMessage; 427 $m = new TestMessage(); 428 $m->setOptionalInt32(new TestMessage()); 436 $m = new TestMessage(); 445 $m = new TestMessage(); 446 $m->setOptionalUint32(new TestMessage()); 454 $m = new TestMessage(); 463 $m = new TestMessage(); [all...] |
H A D | GeneratedClassTest.php | 17 use Foo\TestMessage; 18 use Foo\TestMessage\Sub; 20 use Foo\TestMessage\NestedEnum; 36 $m = new TestMessage(); 47 $m = new TestMessage(); 80 $m = new TestMessage(); 102 $m = new TestMessage(); 141 $m = new TestMessage(); 193 $m = new TestMessage(); 240 $m = new TestMessage(); [all...] |
H A D | ArrayTest.php | 7 use Foo\TestMessage; 8 use Foo\TestMessage\Sub; 541 $m = new TestMessage(); 547 $m = new TestMessage(); 553 $m = new TestMessage(); 559 $m = new TestMessage(); 563 $m = new TestMessage(); 578 $arr = new RepeatedField(GPBType::MESSAGE, TestMessage::class); 579 $arr[] = new TestMessage;
|
/third_party/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/ |
H A D | OldExtensions1.cs | 33 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.TestProtos.OldGenerator.TestMessage), global::Google.Protobuf.TestProtos.OldGenerator.TestMessage.Parser, null, null, null, null) in OldExtensions1Reflection() 43 public sealed partial class TestMessage : pb::IMessage<TestMessage> { class 44 private static readonly pb::MessageParser<TestMessage> _parser = new pb::MessageParser<TestMessage>(() => new TestMessage()); 47 public static pb::MessageParser<TestMessage> Parser { get { return _parser; } } 60 public TestMessage() { in TestMessage() method in Google.Protobuf.TestProtos.OldGenerator.TestMessage 67 public TestMessage(TestMessag method in Google.Protobuf.TestProtos.OldGenerator.TestMessage [all...] |
/third_party/protobuf/js/experimental/benchmarks/code_size/kernel/ |
H A D | popular_types.js | 24 const TestMessage = goog.require('protobuf.testing.binary.TestMessage'); 34 const message = new TestMessage(Kernel.createEmpty()); 36 message.addRepeatedMessageElement(1, message, TestMessage.instanceCreator); 37 message.addRepeatedMessageIterable(1, [message], TestMessage.instanceCreator); 45 message.setRepeatedMessageElement(1, message, TestMessage.instanceCreator, 0); 53 s += message.getMessage(1, TestMessage.instanceCreator); 54 s += message.getMessageOrNull(1, TestMessage.instanceCreator); 58 s += message.getRepeatedMessageElement(1, TestMessage.instanceCreator, 0); 59 s += message.getRepeatedMessageIterable(1, TestMessage [all...] |
H A D | all_types.js | 10 const TestMessage = goog.require('protobuf.testing.binary.TestMessage'); 20 const message = new TestMessage(Kernel.createEmpty()); 52 message.addRepeatedMessageElement(1, message, TestMessage.instanceCreator); 53 message.addRepeatedMessageIterable(1, [message], TestMessage.instanceCreator); 127 message.setRepeatedMessageElement(1, message, TestMessage.instanceCreator, 0); 165 s += message.getMessage(1, TestMessage.instanceCreator); 197 s += message.getRepeatedMessageElement(1, TestMessage.instanceCreator, 0); 198 s += message.getRepeatedMessageIterable(1, TestMessage.instanceCreator); 199 s += message.getRepeatedMessageSize(1, TestMessage [all...] |
/third_party/protobuf/ruby/compatibility_tests/v3.0.0/tests/ |
H A D | repeated_field_test.rb | 9 m = TestMessage.new 10 (Enumerable.instance_methods - TestMessage.new.repeated_string.methods).each do |method_name| 16 m = TestMessage.new 17 arr_methods = ([].methods - TestMessage.new.repeated_string.methods) 30 m = TestMessage.new 31 repeated_field_names(TestMessage).each do |field_name| 50 m = TestMessage.new 51 repeated_field_names(TestMessage).each do |field_name| 70 m = TestMessage.new 71 repeated_field_names(TestMessage) [all...] |
H A D | basic.rb | 24 add_message "TestMessage" do 102 TestMessage = pool.lookup("TestMessage").msgclass 121 m = TestMessage.new 136 m = TestMessage.new 161 m = TestMessage.new(:optional_int32 => -42, 175 m = TestMessage.new(:optional_int32 => -42, 179 expected = '<BasicTest::TestMessage: optional_int32: -42, optional_int64: 0, optional_uint32: 0, optional_uint64: 0, optional_bool: false, optional_float: 0.0, optional_double: 0.0, optional_string: "", optional_bytes: "", optional_msg: <BasicTest::TestMessage2: foo: 0>, optional_enum: :A, repeated_int32: [], repeated_int64: [], repeated_uint32: [], repeated_uint64: [], repeated_bool: [], repeated_float: [], repeated_double: [], repeated_string: ["hello", "there", "world"], repeated_bytes: [], repeated_msg: [], repeated_enum: []>' 184 m1 = TestMessage.new(:optional_int32 => 42) 185 m2 = TestMessage [all...] |
H A D | stress.rb | 9 add_message "TestMessage" do 18 TestMessage = pool.lookup("TestMessage").msgclass 23 TestMessage.new(:a => 1000, 29 data = TestMessage.encode(m) 31 mnew = TestMessage.decode(data) 34 assert TestMessage.encode(mnew) == data
|
/third_party/protobuf/js/experimental/runtime/kernel/ |
H A D | message_set_test.js | 10 const TestMessage = goog.require('protobuf.testing.binary.TestMessage'); 23 expect(messageSet.getMessageOrNull(12345, TestMessage.instanceCreator)) 34 const message = TestMessage.createEmpty(); 36 expect(messageSet.getMessageOrNull(12345, TestMessage.instanceCreator)) 42 const message = TestMessage.createEmpty(); 55 const message = TestMessage.createEmpty(); 62 const message = TestMessage.createEmpty(); 76 const message = TestMessage.createEmpty(); 89 messageSet.getMessageOrNull(12345, TestMessage [all...] |
H A D | kernel_compatibility_test.js | 20 const TestMessage = goog.require('protobuf.testing.binary.TestMessage'); 53 const message = new TestMessage(Kernel.createEmpty()); 62 expect(newAccessor.getRepeatedMessageSize(1, TestMessage.instanceCreator)) 65 newAccessor.getRepeatedMessageElement(1, TestMessage.instanceCreator, 0) 71 const message = new TestMessage(Kernel.createEmpty()); 128 const message1 = new TestMessage(Kernel.createEmpty()); 130 const message2 = new TestMessage(Kernel.createEmpty()); 136 1, message1, TestMessage.instanceCreator); 138 1, message2, TestMessage [all...] |
H A D | kernel_test.js | 12 const TestMessage = goog.require('protobuf.testing.binary.TestMessage'); 363 const msg = accessor.getMessageOrNull(1, TestMessage.instanceCreator); 370 const msg = accessor.getMessageOrNull(1, TestMessage.instanceCreator); 383 accessor.getMessageOrNull(1, TestMessage.instanceCreator); 391 const msg = accessor.getMessageOrNull(1, TestMessage.instanceCreator); 408 accessor.getMessageOrNull(1, TestMessage.instanceCreator); 441 accessor.getMessageOrNull(1, TestMessage.instanceCreator); 461 const submsg1 = new TestMessage(subaccessor); 463 const submsg2 = accessor.getMessage(1, TestMessage [all...] |
H A D | kernel_repeated_test.js | 12 const TestMessage = goog.require('protobuf.testing.binary.TestMessage'); 56 * @param {!Iterable<!TestMessage>} iterable 57 * @param {!Array<!TestMessage>} expected 7019 accessor.getRepeatedMessageIterable(1, TestMessage.instanceCreator), 7031 accessor.getRepeatedMessageIterable(1, TestMessage.instanceCreator); 7033 accessor.getRepeatedMessageIterable(1, TestMessage.instanceCreator); 7039 expect(accessor.getRepeatedMessageSize(1, TestMessage.instanceCreator)) 7046 const msg1 = new TestMessage(Kernel.fromArrayBuffer(bytes1)); 7047 const msg2 = new TestMessage(Kerne [all...] |
/third_party/skia/tests/ |
H A D | MessageBusTest.cpp | 14 struct TestMessage { struct 15 TestMessage(int i, float f) : x(i), y(f) {} in TestMessage() function 21 static inline bool SkShouldPostMessageToBus(const TestMessage&, uint32_t) { in SkShouldPostMessageToBus() argument 27 DECLARE_SKMESSAGEBUS_MESSAGE(TestMessage, uint32_t, true) 30 using TestMessageBus = SkMessageBus<TestMessage, uint32_t>; in DEF_TEST() 35 const TestMessage m1 = { 5, 4.2f }; in DEF_TEST() 36 const TestMessage m2 = { 6, 4.3f }; in DEF_TEST() 41 SkTArray<TestMessage> messages; in DEF_TEST() 48 const TestMessage m3 = { 1, 0.3f }; in DEF_TEST()
|
/third_party/protobuf/python/google/protobuf/internal/ |
H A D | json_format_test.py | 108 message = json_format_proto3_pb2.TestMessage() 118 message = json_format_proto3_pb2.TestMessage() 121 parsed_message = json_format_proto3_pb2.TestMessage() 125 message = json_format_proto3_pb2.TestMessage( 131 parsed_message = json_format_proto3_pb2.TestMessage() 135 message = json_format_proto3_pb2.TestMessage() 163 parsed_message = json_format_proto3_pb2.TestMessage() 169 message = json_format_proto3_pb2.TestMessage() 173 parsed_message = json_format_proto3_pb2.TestMessage() 192 'Message type proto3.TestMessage doe [all...] |
/third_party/protobuf/src/google/protobuf/util/ |
H A D | json_util_test.cc | 57 using proto3::TestMessage; 89 TestMessage m; in TEST_F() 103 TestMessage m; in TEST_F() 190 TestMessage m; in TEST_F() 199 TestMessage orig; in TEST_F() 210 TestMessage parsed; in TEST_F() 258 TestMessage m; in TEST_F() 305 TestMessage m; in TEST_F() 312 TestMessage m; in TEST_F() 340 factory.GetPrototype(pool.FindMessageTypeByName("proto3.TestMessage")) in TEST_F() [all...] |