• Home
  • Raw
  • Download

Lines Matching refs:msg

102 function fillAllFields(msg) {  argument
103 msg.setOptionalInt32(-42);
106 msg.setOptionalInt64(-0x7fffffff00000000);
107 msg.setOptionalUint32(0x80000000);
108 msg.setOptionalUint64(0xf000000000000000);
109 msg.setOptionalSint32(-100);
110 msg.setOptionalSint64(-0x8000000000000000);
111 msg.setOptionalFixed32(1234);
112 msg.setOptionalFixed64(0x1234567800000000);
113 msg.setOptionalSfixed32(-1234);
114 msg.setOptionalSfixed64(-0x1234567800000000);
115 msg.setOptionalFloat(1.5);
116 msg.setOptionalDouble(-1.5);
117 msg.setOptionalBool(true);
118 msg.setOptionalString('hello world');
119 msg.setOptionalBytes(BYTES);
120 msg.setOptionalGroup(new proto.jspb.test.TestAllTypes.OptionalGroup());
121 msg.getOptionalGroup().setA(100);
124 msg.setOptionalForeignMessage(submsg);
125 msg.setOptionalForeignEnum(proto.jspb.test.ForeignEnum.FOREIGN_FOO);
126 msg.setOneofString('oneof');
129 msg.setRepeatedInt32List([-42]);
130 msg.setRepeatedInt64List([-0x7fffffff00000000]);
131 msg.setRepeatedUint32List([0x80000000]);
132 msg.setRepeatedUint64List([0xf000000000000000]);
133 msg.setRepeatedSint32List([-100]);
134 msg.setRepeatedSint64List([-0x8000000000000000]);
135 msg.setRepeatedFixed32List([1234]);
136 msg.setRepeatedFixed64List([0x1234567800000000]);
137 msg.setRepeatedSfixed32List([-1234]);
138 msg.setRepeatedSfixed64List([-0x1234567800000000]);
139 msg.setRepeatedFloatList([1.5]);
140 msg.setRepeatedDoubleList([-1.5]);
141 msg.setRepeatedBoolList([true]);
142 msg.setRepeatedStringList(['hello world']);
143 msg.setRepeatedBytesList([BYTES, BYTES]);
144 msg.setRepeatedGroupList([new proto.jspb.test.TestAllTypes.RepeatedGroup()]);
145 msg.getRepeatedGroupList()[0].setA(100);
148 msg.setRepeatedForeignMessageList([submsg]);
149 msg.setRepeatedForeignEnumList([proto.jspb.test.ForeignEnum.FOREIGN_FOO]);
151 msg.setPackedRepeatedInt32List([-42]);
152 msg.setPackedRepeatedInt64List([-0x7fffffff00000000]);
153 msg.setPackedRepeatedUint32List([0x80000000]);
154 msg.setPackedRepeatedUint64List([0xf000000000000000]);
155 msg.setPackedRepeatedSint32List([-100]);
156 msg.setPackedRepeatedSint64List([-0x8000000000000000]);
157 msg.setPackedRepeatedFixed32List([1234]);
158 msg.setPackedRepeatedFixed64List([0x1234567800000000]);
159 msg.setPackedRepeatedSfixed32List([-1234]);
160 msg.setPackedRepeatedSfixed64List([-0x1234567800000000]);
161 msg.setPackedRepeatedFloatList([1.5]);
162 msg.setPackedRepeatedDoubleList([-1.5]);
163 msg.setPackedRepeatedBoolList([true]);
280 function checkExtensions(msg) { argument
282 msg.getExtension(proto.jspb.test.extendOptionalInt32));
284 msg.getExtension(proto.jspb.test.extendOptionalInt64));
286 msg.getExtension(proto.jspb.test.extendOptionalUint32));
288 msg.getExtension(proto.jspb.test.extendOptionalUint64));
290 msg.getExtension(proto.jspb.test.extendOptionalSint32));
292 msg.getExtension(proto.jspb.test.extendOptionalSint64));
294 msg.getExtension(proto.jspb.test.extendOptionalFixed32));
296 msg.getExtension(proto.jspb.test.extendOptionalFixed64));
298 msg.getExtension(proto.jspb.test.extendOptionalSfixed32));
300 msg.getExtension(proto.jspb.test.extendOptionalSfixed64));
302 msg.getExtension(proto.jspb.test.extendOptionalFloat));
304 msg.getExtension(proto.jspb.test.extendOptionalDouble));
306 msg.getExtension(proto.jspb.test.extendOptionalBool));
308 msg.getExtension(proto.jspb.test.extendOptionalString));
311 msg.getExtension(proto.jspb.test.extendOptionalBytes), BYTES));
313 msg.getExtension(
318 msg.getExtension(proto.jspb.test.extendRepeatedInt32List),
321 msg.getExtension(proto.jspb.test.extendRepeatedInt64List),
324 msg.getExtension(proto.jspb.test.extendRepeatedUint32List),
327 msg.getExtension(proto.jspb.test.extendRepeatedUint64List),
330 msg.getExtension(proto.jspb.test.extendRepeatedSint32List),
333 msg.getExtension(proto.jspb.test.extendRepeatedSint64List),
336 msg.getExtension(proto.jspb.test.extendRepeatedFixed32List),
339 msg.getExtension(proto.jspb.test.extendRepeatedFixed64List),
342 msg.getExtension(proto.jspb.test.extendRepeatedSfixed32List),
345 msg.getExtension(proto.jspb.test.extendRepeatedSfixed64List),
348 msg.getExtension(proto.jspb.test.extendRepeatedFloatList),
351 msg.getExtension(proto.jspb.test.extendRepeatedDoubleList),
354 msg.getExtension(proto.jspb.test.extendRepeatedBoolList),
357 msg.getExtension(proto.jspb.test.extendRepeatedStringList),
362 msg.getExtension(proto.jspb.test.extendRepeatedBytesList)[0], BYTES));
364 msg.getExtension(
368 msg.getExtension(proto.jspb.test.extendRepeatedForeignEnumList),
373 msg.getExtension(proto.jspb.test.extendPackedRepeatedInt32List),
376 msg.getExtension(proto.jspb.test.extendPackedRepeatedInt64List),
379 msg.getExtension(proto.jspb.test.extendPackedRepeatedUint32List),
382 msg.getExtension(proto.jspb.test.extendPackedRepeatedUint64List),
385 msg.getExtension(proto.jspb.test.extendPackedRepeatedSint32List),
388 msg.getExtension(proto.jspb.test.extendPackedRepeatedSint64List),
391 msg.getExtension(proto.jspb.test.extendPackedRepeatedFixed32List),
394 msg.getExtension(proto.jspb.test.extendPackedRepeatedFixed64List),
397 msg.getExtension(proto.jspb.test.extendPackedRepeatedSfixed32List),
400 msg.getExtension(proto.jspb.test.extendPackedRepeatedSfixed64List),
403 msg.getExtension(proto.jspb.test.extendPackedRepeatedFloatList),
406 msg.getExtension(proto.jspb.test.extendPackedRepeatedDoubleList),
409 msg.getExtension(proto.jspb.test.extendPackedRepeatedBoolList),
412 msg.getExtension(proto.jspb.test.extendPackedRepeatedForeignEnumList),
424 var msg = new proto.jspb.test.TestAllTypes();
425 fillAllFields(msg);
426 var encoded = msg.serializeBinary();
428 checkAllFields(msg, decoded);
435 var msg = new proto.jspb.test.TestAllTypes();
437 msg.setOptionalBytes(BYTES_B64);
438 assertTrue(bytesCompare(msg.getOptionalBytes_asU8(), BYTES));
439 assertTrue(bytesCompare(msg.getOptionalBytes_asB64(), BYTES));
440 assertTrue(bytesCompare(msg.getOptionalBytes(), BYTES));
443 msg = proto.jspb.test.TestAllTypes.deserializeBinary(msg.serializeBinary());
444 assertTrue(bytesCompare(msg.getOptionalBytes_asU8(), BYTES));
445 assertTrue(bytesCompare(msg.getOptionalBytes_asB64(), BYTES));
446 assertTrue(bytesCompare(msg.getOptionalBytes(), BYTES));
448 msg = new proto.jspb.test.TestAllTypes();
450 msg.setOptionalBytes(BYTES);
451 assertTrue(bytesCompare(msg.getOptionalBytes_asU8(), BYTES));
452 assertTrue(bytesCompare(msg.getOptionalBytes_asB64(), BYTES));
453 assertTrue(bytesCompare(msg.getOptionalBytes(), BYTES));
461 var msg = new proto.jspb.test.TestAllTypes();
462 msg.setOptionalBytes(BYTES);
463 assertTrue(bytesCompare(msg.getOptionalBytes(), BYTES));
465 msg.setOptionalBytes(msg.getOptionalBytes());
466 assertTrue(bytesCompare(msg.getOptionalBytes(), BYTES));
467 msg.setOptionalBytes(msg.getOptionalBytes_asB64());
468 assertTrue(bytesCompare(msg.getOptionalBytes(), BYTES));
469 msg.setOptionalBytes(msg.getOptionalBytes_asU8());
470 assertTrue(bytesCompare(msg.getOptionalBytes(), BYTES));
477 var msg = new proto.jspb.test.TestAllTypes();
480 assertTrue(goog.isString(msg.getRepeatedBytesList_asB64()[0]));
481 assertTrue(goog.isString(msg.getRepeatedBytesList_asB64()[1]));
482 assertTrue(msg.getRepeatedBytesList_asU8()[0] instanceof Uint8Array);
483 assertTrue(msg.getRepeatedBytesList_asU8()[1] instanceof Uint8Array);
485 assertTrue(bytesCompare(msg.getRepeatedBytesList()[0], BYTES));
486 assertTrue(bytesCompare(msg.getRepeatedBytesList()[1], BYTES));
487 assertTrue(bytesCompare(msg.getRepeatedBytesList_asB64()[0], BYTES));
488 assertTrue(bytesCompare(msg.getRepeatedBytesList_asB64()[1], BYTES));
489 assertTrue(bytesCompare(msg.getRepeatedBytesList_asU8()[0], BYTES));
490 assertTrue(bytesCompare(msg.getRepeatedBytesList_asU8()[1], BYTES));
493 msg.setRepeatedBytesList([BYTES, BYTES]);
496 msg.setRepeatedBytesList([BYTES_B64, BYTES_B64]);
499 msg.setRepeatedBytesList(null);
500 assertEquals(0, msg.getRepeatedBytesList().length);
501 assertEquals(0, msg.getRepeatedBytesList_asB64().length);
502 assertEquals(0, msg.getRepeatedBytesList_asU8().length);
509 function fillExtensions(msg) { argument
510 msg.setExtension(
512 msg.setExtension(
514 msg.setExtension(
516 msg.setExtension(
518 msg.setExtension(
520 msg.setExtension(
522 msg.setExtension(
524 msg.setExtension(
526 msg.setExtension(
528 msg.setExtension(
530 msg.setExtension(
532 msg.setExtension(
534 msg.setExtension(
536 msg.setExtension(
538 msg.setExtension(proto.jspb.test.extendOptionalBytes, BYTES);
541 msg.setExtension(
543 msg.setExtension(
548 msg.setExtension(
550 msg.setExtension(
552 msg.setExtension(
554 msg.setExtension(
556 msg.setExtension(
558 msg.setExtension(
560 msg.setExtension(
562 msg.setExtension(
564 msg.setExtension(
566 msg.setExtension(
568 msg.setExtension(
570 msg.setExtension(
572 msg.setExtension(
574 msg.setExtension(
576 msg.setExtension(proto.jspb.test.extendRepeatedBytesList, [BYTES]);
579 msg.setExtension(
581 msg.setExtension(proto.jspb.test.extendRepeatedForeignEnumList,
585 msg.setExtension(
587 msg.setExtension(
589 msg.setExtension(
591 msg.setExtension(
593 msg.setExtension(
595 msg.setExtension(
597 msg.setExtension(
599 msg.setExtension(
601 msg.setExtension(
603 msg.setExtension(
606 msg.setExtension(
608 msg.setExtension(
610 msg.setExtension(
612 msg.setExtension(proto.jspb.test.extendPackedRepeatedForeignEnumList,
622 var msg = new proto.jspb.test.TestExtendable();
623 fillExtensions(msg);
624 var encoded = msg.serializeBinary();