• Home
  • Raw
  • Download

Lines Matching refs:dst

54   Message3 *dst = [[Message3 alloc] init];
58 dst.optionalInt32 = 1;
59 dst.optionalInt64 = 1;
60 dst.optionalUint32 = 1;
61 dst.optionalUint64 = 1;
62 dst.optionalSint32 = 1;
63 dst.optionalSint64 = 1;
64 dst.optionalFixed32 = 1;
65 dst.optionalFixed64 = 1;
66 dst.optionalSfixed32 = 1;
67 dst.optionalSfixed64 = 1;
68 dst.optionalFloat = 1.0f;
69 dst.optionalDouble = 1.0;
70 dst.optionalBool = YES;
71 dst.optionalString = @"bar";
72 dst.optionalBytes = testData1;
73 dst.optionalEnum = Message3_Enum_Bar;
94 [dst mergeFrom:src];
96 XCTAssertEqual(dst.optionalInt32, 1);
97 XCTAssertEqual(dst.optionalInt64, 1);
98 XCTAssertEqual(dst.optionalUint32, 1U);
99 XCTAssertEqual(dst.optionalUint64, 1U);
100 XCTAssertEqual(dst.optionalSint32, 1);
101 XCTAssertEqual(dst.optionalSint64, 1);
102 XCTAssertEqual(dst.optionalFixed32, 1U);
103 XCTAssertEqual(dst.optionalFixed64, 1U);
104 XCTAssertEqual(dst.optionalSfixed32, 1);
105 XCTAssertEqual(dst.optionalSfixed64, 1);
106 XCTAssertEqual(dst.optionalFloat, 1.0f);
107 XCTAssertEqual(dst.optionalDouble, 1.0);
108 XCTAssertEqual(dst.optionalBool, YES);
109 XCTAssertEqualObjects(dst.optionalString, @"bar");
110 XCTAssertEqualObjects(dst.optionalBytes, testData1);
111 XCTAssertEqual(dst.optionalEnum, Message3_Enum_Bar);
132 [dst mergeFrom:src];
134 XCTAssertEqual(dst.optionalInt32, 1);
135 XCTAssertEqual(dst.optionalInt64, 2);
136 XCTAssertEqual(dst.optionalUint32, 1U);
137 XCTAssertEqual(dst.optionalUint64, 2U);
138 XCTAssertEqual(dst.optionalSint32, 1);
139 XCTAssertEqual(dst.optionalSint64, 2);
140 XCTAssertEqual(dst.optionalFixed32, 1U);
141 XCTAssertEqual(dst.optionalFixed64, 2U);
142 XCTAssertEqual(dst.optionalSfixed32, 1);
143 XCTAssertEqual(dst.optionalSfixed64, 2);
144 XCTAssertEqual(dst.optionalFloat, 1.0f);
145 XCTAssertEqual(dst.optionalDouble, 2.0);
146 XCTAssertEqual(dst.optionalBool, YES);
147 XCTAssertEqualObjects(dst.optionalString, @"baz");
148 XCTAssertEqualObjects(dst.optionalBytes, testData1);
149 XCTAssertEqual(dst.optionalEnum, Message3_Enum_Baz);
170 [dst mergeFrom:src];
172 XCTAssertEqual(dst.optionalInt32, 3);
173 XCTAssertEqual(dst.optionalInt64, 2);
174 XCTAssertEqual(dst.optionalUint32, 3U);
175 XCTAssertEqual(dst.optionalUint64, 2U);
176 XCTAssertEqual(dst.optionalSint32, 3);
177 XCTAssertEqual(dst.optionalSint64, 2);
178 XCTAssertEqual(dst.optionalFixed32, 3U);
179 XCTAssertEqual(dst.optionalFixed64, 2U);
180 XCTAssertEqual(dst.optionalSfixed32, 3);
181 XCTAssertEqual(dst.optionalSfixed64, 2);
182 XCTAssertEqual(dst.optionalFloat, 3.0f);
183 XCTAssertEqual(dst.optionalDouble, 2.0);
184 XCTAssertEqual(dst.optionalBool, YES);
185 XCTAssertEqualObjects(dst.optionalString, @"baz");
186 XCTAssertEqualObjects(dst.optionalBytes, testData2);
187 XCTAssertEqual(dst.optionalEnum, Message3_Enum_Baz);
190 [dst release];
195 UnknownEnumsMyMessage *dst = [UnknownEnumsMyMessage message];
208 [dst mergeFrom:src];
210 XCTAssertEqual(dst.e, UnknownEnumsMyEnum_Bar);
211 XCTAssertEqual(dst.repeatedEArray.count, 1U);
212 XCTAssertEqual([dst.repeatedEArray valueAtIndex:0], UnknownEnumsMyEnum_Bar);
213 XCTAssertEqual(dst.repeatedPackedEArray.count, 1U);
214 XCTAssertEqual([dst.repeatedPackedEArray valueAtIndex:0],
216 XCTAssertEqual(dst.oneofE1, UnknownEnumsMyEnum_Bar);
231 [dst mergeFrom:src];
233 XCTAssertEqual(dst.e, UnknownEnumsMyEnum_GPBUnrecognizedEnumeratorValue);
234 XCTAssertEqual(UnknownEnumsMyMessage_E_RawValue(dst), kUnknownValue);
235 XCTAssertEqual(dst.repeatedEArray.count, 2U);
236 XCTAssertEqual([dst.repeatedEArray valueAtIndex:0], UnknownEnumsMyEnum_Bar);
237 XCTAssertEqual([dst.repeatedEArray valueAtIndex:1],
239 XCTAssertEqual([dst.repeatedEArray rawValueAtIndex:1], kUnknownValue);
240 XCTAssertEqual(dst.repeatedPackedEArray.count, 2U);
241 XCTAssertEqual([dst.repeatedPackedEArray valueAtIndex:0],
243 XCTAssertEqual([dst.repeatedPackedEArray valueAtIndex:1],
245 XCTAssertEqual([dst.repeatedPackedEArray rawValueAtIndex:1], kUnknownValue);
246 XCTAssertEqual(dst.oneofE1,
248 XCTAssertEqual(UnknownEnumsMyMessage_OneofE1_RawValue(dst), kUnknownValue);
253 Message2 *dst = [Message2 message];
256 // Make sure whatever is in dst gets cleared out be merging in something else.
259 dst.oneofEnum = Message2_Enum_Bar;
263 //% [dst mergeFrom:src];
264 //% XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_Oneof##SET_NAME);
265 //% XCTAssertEqual(dst.oneof##SET_NAME, SET_VALUE);
266 //% XCTAssertEqual(dst.oneof##CLEARED_NAME, CLEARED_DEFAULT);
273 [dst mergeFrom:src];
274 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofInt32);
275 XCTAssertEqual(dst.oneofInt32, 10);
276 XCTAssertEqual(dst.oneofEnum, Message2_Enum_Baz);
284 [dst mergeFrom:src];
285 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofInt64);
286 XCTAssertEqual(dst.oneofInt64, 11);
287 XCTAssertEqual(dst.oneofInt32, 100);
295 [dst mergeFrom:src];
296 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofUint32);
297 XCTAssertEqual(dst.oneofUint32, 12U);
298 XCTAssertEqual(dst.oneofInt64, 101);
306 [dst mergeFrom:src];
307 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofUint64);
308 XCTAssertEqual(dst.oneofUint64, 13U);
309 XCTAssertEqual(dst.oneofUint32, 102U);
317 [dst mergeFrom:src];
318 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofSint32);
319 XCTAssertEqual(dst.oneofSint32, 14);
320 XCTAssertEqual(dst.oneofUint64, 103U);
328 [dst mergeFrom:src];
329 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofSint64);
330 XCTAssertEqual(dst.oneofSint64, 15);
331 XCTAssertEqual(dst.oneofSint32, 104);
339 [dst mergeFrom:src];
340 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofFixed32);
341 XCTAssertEqual(dst.oneofFixed32, 16U);
342 XCTAssertEqual(dst.oneofSint64, 105);
350 [dst mergeFrom:src];
351 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofFixed64);
352 XCTAssertEqual(dst.oneofFixed64, 17U);
353 XCTAssertEqual(dst.oneofFixed32, 106U);
361 [dst mergeFrom:src];
362 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofSfixed32);
363 XCTAssertEqual(dst.oneofSfixed32, 18);
364 XCTAssertEqual(dst.oneofFixed64, 107U);
372 [dst mergeFrom:src];
373 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofSfixed64);
374 XCTAssertEqual(dst.oneofSfixed64, 19);
375 XCTAssertEqual(dst.oneofSfixed32, 108);
383 [dst mergeFrom:src];
384 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofFloat);
385 XCTAssertEqual(dst.oneofFloat, 20.0f);
386 XCTAssertEqual(dst.oneofSfixed64, 109);
394 [dst mergeFrom:src];
395 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofDouble);
396 XCTAssertEqual(dst.oneofDouble, 21.0);
397 XCTAssertEqual(dst.oneofFloat, 110.0f);
405 [dst mergeFrom:src];
406 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofBool);
407 XCTAssertEqual(dst.oneofBool, NO);
408 XCTAssertEqual(dst.oneofDouble, 111.0);
416 [dst mergeFrom:src];
417 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofEnum);
418 XCTAssertEqual(dst.oneofEnum, Message2_Enum_Bar);
419 XCTAssertEqual(dst.oneofBool, YES);
428 [dst mergeFrom:src];
429 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofString);
430 XCTAssertEqualObjects(dst.oneofString, @"foo");
431 XCTAssertEqual(dst.oneofEnum, Message2_Enum_Baz);
434 [dst mergeFrom:src];
435 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofBytes);
436 XCTAssertEqualObjects(dst.oneofBytes,
438 XCTAssertEqualObjects(dst.oneofString, oneofStringDefault);
443 [dst mergeFrom:src];
444 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofGroup);
445 Message2_OneofGroup *mergedGroup = [[dst.oneofGroup retain] autorelease];
449 XCTAssertEqualObjects(dst.oneofBytes, oneofBytesDefault);
454 [dst mergeFrom:src];
455 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofMessage);
456 Message2 *mergedSubMessage = [[dst.oneofMessage retain] autorelease];
460 XCTAssertNotNil(dst.oneofGroup);
461 XCTAssertNotEqual(dst.oneofGroup, mergedGroup); // Pointer comparison.
466 [dst mergeFrom:src];
467 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofInt32);
468 XCTAssertNotNil(dst.oneofMessage);
469 XCTAssertNotEqual(dst.oneofMessage,
479 dst.oneofGroup = mergedGroup;
480 [dst mergeFrom:src];
481 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofGroup);
483 XCTAssertEqual(dst.oneofGroup, mergedGroup); // Pointer comparison.
484 XCTAssertEqual(dst.oneofGroup.a, 666); // Pointer comparison.
485 XCTAssertEqual(dst.oneofGroup.b, 888); // Pointer comparison.
490 dst.oneofMessage = mergedSubMessage;
491 [dst mergeFrom:src];
492 XCTAssertEqual(dst.oOneOfCase, Message2_O_OneOfCase_OneofMessage);
494 XCTAssertEqual(dst.oneofMessage, mergedSubMessage); // Pointer comparison.
495 XCTAssertEqual(dst.oneofMessage.optionalInt32, 777); // Pointer comparison.
496 XCTAssertEqual(dst.oneofMessage.optionalInt64, 999); // Pointer comparison.
501 Message3 *dst = [Message3 message];
504 // Make sure whatever is in dst gets cleared out be merging in something else.
507 dst.oneofEnum = Message3_Enum_Bar;
511 //% [dst mergeFrom:src];
512 //% XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_Oneof##SET_NAME);
513 //% XCTAssertEqual(dst.oneof##SET_NAME, SET_VALUE);
514 //% XCTAssertEqual(dst.oneof##CLEARED_NAME, CLEARED_DEFAULT);
521 [dst mergeFrom:src];
522 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofInt32);
523 XCTAssertEqual(dst.oneofInt32, 10);
524 XCTAssertEqual(dst.oneofEnum, Message3_Enum_Foo);
532 [dst mergeFrom:src];
533 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofInt64);
534 XCTAssertEqual(dst.oneofInt64, 11);
535 XCTAssertEqual(dst.oneofInt32, 0);
543 [dst mergeFrom:src];
544 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofUint32);
545 XCTAssertEqual(dst.oneofUint32, 12U);
546 XCTAssertEqual(dst.oneofInt64, 0);
554 [dst mergeFrom:src];
555 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofUint64);
556 XCTAssertEqual(dst.oneofUint64, 13U);
557 XCTAssertEqual(dst.oneofUint32, 0U);
565 [dst mergeFrom:src];
566 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofSint32);
567 XCTAssertEqual(dst.oneofSint32, 14);
568 XCTAssertEqual(dst.oneofUint64, 0U);
576 [dst mergeFrom:src];
577 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofSint64);
578 XCTAssertEqual(dst.oneofSint64, 15);
579 XCTAssertEqual(dst.oneofSint32, 0);
587 [dst mergeFrom:src];
588 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofFixed32);
589 XCTAssertEqual(dst.oneofFixed32, 16U);
590 XCTAssertEqual(dst.oneofSint64, 0);
598 [dst mergeFrom:src];
599 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofFixed64);
600 XCTAssertEqual(dst.oneofFixed64, 17U);
601 XCTAssertEqual(dst.oneofFixed32, 0U);
609 [dst mergeFrom:src];
610 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofSfixed32);
611 XCTAssertEqual(dst.oneofSfixed32, 18);
612 XCTAssertEqual(dst.oneofFixed64, 0U);
620 [dst mergeFrom:src];
621 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofSfixed64);
622 XCTAssertEqual(dst.oneofSfixed64, 19);
623 XCTAssertEqual(dst.oneofSfixed32, 0);
631 [dst mergeFrom:src];
632 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofFloat);
633 XCTAssertEqual(dst.oneofFloat, 20.0f);
634 XCTAssertEqual(dst.oneofSfixed64, 0);
642 [dst mergeFrom:src];
643 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofDouble);
644 XCTAssertEqual(dst.oneofDouble, 21.0);
645 XCTAssertEqual(dst.oneofFloat, 0.0f);
653 [dst mergeFrom:src];
654 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofBool);
655 XCTAssertEqual(dst.oneofBool, YES);
656 XCTAssertEqual(dst.oneofDouble, 0.0);
664 [dst mergeFrom:src];
665 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofEnum);
666 XCTAssertEqual(dst.oneofEnum, Message3_Enum_Bar);
667 XCTAssertEqual(dst.oneofBool, NO);
676 [dst mergeFrom:src];
677 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofString);
678 XCTAssertEqualObjects(dst.oneofString, @"foo");
679 XCTAssertEqual(dst.oneofEnum, Message3_Enum_Foo);
682 [dst mergeFrom:src];
683 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofBytes);
684 XCTAssertEqualObjects(dst.oneofBytes,
686 XCTAssertEqualObjects(dst.oneofString, oneofStringDefault);
692 [dst mergeFrom:src];
693 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofMessage);
694 Message3 *mergedSubMessage = [[dst.oneofMessage retain] autorelease];
698 XCTAssertEqualObjects(dst.oneofBytes, oneofBytesDefault);
703 [dst mergeFrom:src];
704 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofInt32);
705 XCTAssertNotNil(dst.oneofMessage);
706 XCTAssertNotEqual(dst.oneofMessage,
716 dst.oneofMessage = mergedSubMessage;
717 [dst mergeFrom:src];
718 XCTAssertEqual(dst.oOneOfCase, Message3_O_OneOfCase_OneofMessage);
720 XCTAssertEqual(dst.oneofMessage, mergedSubMessage); // Pointer comparison.
721 XCTAssertEqual(dst.oneofMessage.optionalInt32, 777); // Pointer comparison.
722 XCTAssertEqual(dst.oneofMessage.optionalInt64, 999); // Pointer comparison.