|
|
|
@ -267,6 +267,7 @@ |
|
|
|
|
//% |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Int32, 10, Enum, Message2_Enum_Baz) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofInt32 = 10; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -274,8 +275,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofInt32, 10); |
|
|
|
|
XCTAssertEqual(dst.oneofEnum, Message2_Enum_Baz); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Int64, 11, Int32, 100) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofInt64 = 11; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -283,8 +286,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofInt64, 11); |
|
|
|
|
XCTAssertEqual(dst.oneofInt32, 100); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Uint32, 12U, Int64, 101) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofUint32 = 12U; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -292,8 +297,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofUint32, 12U); |
|
|
|
|
XCTAssertEqual(dst.oneofInt64, 101); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Uint64, 13U, Uint32, 102U) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofUint64 = 13U; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -301,8 +308,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofUint64, 13U); |
|
|
|
|
XCTAssertEqual(dst.oneofUint32, 102U); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Sint32, 14, Uint64, 103U) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofSint32 = 14; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -310,8 +319,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofSint32, 14); |
|
|
|
|
XCTAssertEqual(dst.oneofUint64, 103U); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Sint64, 15, Sint32, 104) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofSint64 = 15; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -319,8 +330,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofSint64, 15); |
|
|
|
|
XCTAssertEqual(dst.oneofSint32, 104); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Fixed32, 16U, Sint64, 105) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofFixed32 = 16U; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -328,8 +341,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofFixed32, 16U); |
|
|
|
|
XCTAssertEqual(dst.oneofSint64, 105); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Fixed64, 17U, Fixed32, 106U) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofFixed64 = 17U; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -337,8 +352,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofFixed64, 17U); |
|
|
|
|
XCTAssertEqual(dst.oneofFixed32, 106U); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Sfixed32, 18, Fixed64, 107U) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofSfixed32 = 18; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -346,8 +363,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofSfixed32, 18); |
|
|
|
|
XCTAssertEqual(dst.oneofFixed64, 107U); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Sfixed64, 19, Sfixed32, 108) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofSfixed64 = 19; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -355,8 +374,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofSfixed64, 19); |
|
|
|
|
XCTAssertEqual(dst.oneofSfixed32, 108); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Float, 20.0f, Sfixed64, 109) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofFloat = 20.0f; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -364,8 +385,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofFloat, 20.0f); |
|
|
|
|
XCTAssertEqual(dst.oneofSfixed64, 109); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Double, 21.0, Float, 110.0f) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofDouble = 21.0; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -373,8 +396,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofDouble, 21.0); |
|
|
|
|
XCTAssertEqual(dst.oneofFloat, 110.0f); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Bool, NO, Double, 111.0) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofBool = NO; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -382,8 +407,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofBool, NO); |
|
|
|
|
XCTAssertEqual(dst.oneofDouble, 111.0); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE2_TEST(Enum, Message2_Enum_Bar, Bool, YES) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofEnum = Message2_Enum_Bar; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -391,6 +418,7 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofEnum, Message2_Enum_Bar); |
|
|
|
|
XCTAssertEqual(dst.oneofBool, YES); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND-END (14 expansions) |
|
|
|
|
|
|
|
|
|
NSString *oneofStringDefault = @"string"; |
|
|
|
@ -487,6 +515,7 @@ |
|
|
|
|
//% |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Int32, 10, Enum, Message3_Enum_Foo) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofInt32 = 10; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -494,8 +523,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofInt32, 10); |
|
|
|
|
XCTAssertEqual(dst.oneofEnum, Message3_Enum_Foo); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Int64, 11, Int32, 0) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofInt64 = 11; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -503,8 +534,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofInt64, 11); |
|
|
|
|
XCTAssertEqual(dst.oneofInt32, 0); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Uint32, 12U, Int64, 0) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofUint32 = 12U; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -512,8 +545,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofUint32, 12U); |
|
|
|
|
XCTAssertEqual(dst.oneofInt64, 0); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Uint64, 13U, Uint32, 0U) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofUint64 = 13U; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -521,8 +556,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofUint64, 13U); |
|
|
|
|
XCTAssertEqual(dst.oneofUint32, 0U); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Sint32, 14, Uint64, 0U) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofSint32 = 14; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -530,8 +567,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofSint32, 14); |
|
|
|
|
XCTAssertEqual(dst.oneofUint64, 0U); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Sint64, 15, Sint32, 0) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofSint64 = 15; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -539,8 +578,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofSint64, 15); |
|
|
|
|
XCTAssertEqual(dst.oneofSint32, 0); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Fixed32, 16U, Sint64, 0) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofFixed32 = 16U; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -548,8 +589,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofFixed32, 16U); |
|
|
|
|
XCTAssertEqual(dst.oneofSint64, 0); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Fixed64, 17U, Fixed32, 0U) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofFixed64 = 17U; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -557,8 +600,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofFixed64, 17U); |
|
|
|
|
XCTAssertEqual(dst.oneofFixed32, 0U); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Sfixed32, 18, Fixed64, 0U) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofSfixed32 = 18; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -566,8 +611,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofSfixed32, 18); |
|
|
|
|
XCTAssertEqual(dst.oneofFixed64, 0U); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Sfixed64, 19, Sfixed32, 0) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofSfixed64 = 19; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -575,8 +622,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofSfixed64, 19); |
|
|
|
|
XCTAssertEqual(dst.oneofSfixed32, 0); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Float, 20.0f, Sfixed64, 0) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofFloat = 20.0f; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -584,8 +633,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofFloat, 20.0f); |
|
|
|
|
XCTAssertEqual(dst.oneofSfixed64, 0); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Double, 21.0, Float, 0.0f) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofDouble = 21.0; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -593,8 +644,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofDouble, 21.0); |
|
|
|
|
XCTAssertEqual(dst.oneofFloat, 0.0f); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Bool, YES, Double, 0.0) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofBool = YES; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -602,8 +655,10 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofBool, YES); |
|
|
|
|
XCTAssertEqual(dst.oneofDouble, 0.0); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND MERGE3_TEST(Enum, Message3_Enum_Bar, Bool, NO) |
|
|
|
|
// This block of code is generated, do not edit it directly. |
|
|
|
|
// clang-format off |
|
|
|
|
|
|
|
|
|
src.oneofEnum = Message3_Enum_Bar; |
|
|
|
|
[dst mergeFrom:src]; |
|
|
|
@ -611,6 +666,7 @@ |
|
|
|
|
XCTAssertEqual(dst.oneofEnum, Message3_Enum_Bar); |
|
|
|
|
XCTAssertEqual(dst.oneofBool, NO); |
|
|
|
|
|
|
|
|
|
// clang-format on |
|
|
|
|
//%PDDM-EXPAND-END (14 expansions) |
|
|
|
|
|
|
|
|
|
NSString *oneofStringDefault = @""; |
|
|
|
|