aboutsummaryrefslogtreecommitdiffhomepage
path: root/objectivec/Tests
diff options
context:
space:
mode:
authorGravatar Thomas Van Lenten <thomasvl@google.com>2016-08-12 11:53:04 -0400
committerGravatar Thomas Van Lenten <thomasvl@google.com>2016-08-12 11:53:04 -0400
commita0df678df9bfd9672bf1d9684464c02c461f7105 (patch)
tree4a008660ad1b25fd1c98744f8235f9fc03cb55e7 /objectivec/Tests
parent17d601a2b64035399645ef5c7067ee967d9f34d0 (diff)
Fix some constants to be correct for the message class in use.
Diffstat (limited to 'objectivec/Tests')
-rw-r--r--objectivec/Tests/GPBMessageTests+Runtime.m44
1 files changed, 23 insertions, 21 deletions
diff --git a/objectivec/Tests/GPBMessageTests+Runtime.m b/objectivec/Tests/GPBMessageTests+Runtime.m
index c7ceb539..9060d97e 100644
--- a/objectivec/Tests/GPBMessageTests+Runtime.m
+++ b/objectivec/Tests/GPBMessageTests+Runtime.m
@@ -2122,52 +2122,52 @@
for (size_t i = 0; i < GPBARRAYSIZE(values); ++i) {
switch (values[i]) {
- case Message3_O_OneOfCase_OneofInt32:
+ case Message2_O_OneOfCase_OneofInt32:
msg.oneofInt32 = 100;
break;
- case Message3_O_OneOfCase_OneofInt64:
+ case Message2_O_OneOfCase_OneofInt64:
msg.oneofInt64 = 101;
break;
- case Message3_O_OneOfCase_OneofUint32:
+ case Message2_O_OneOfCase_OneofUint32:
msg.oneofUint32 = 102;
break;
- case Message3_O_OneOfCase_OneofUint64:
+ case Message2_O_OneOfCase_OneofUint64:
msg.oneofUint64 = 103;
break;
- case Message3_O_OneOfCase_OneofSint32:
+ case Message2_O_OneOfCase_OneofSint32:
msg.oneofSint32 = 104;
break;
- case Message3_O_OneOfCase_OneofSint64:
+ case Message2_O_OneOfCase_OneofSint64:
msg.oneofSint64 = 105;
break;
- case Message3_O_OneOfCase_OneofFixed32:
+ case Message2_O_OneOfCase_OneofFixed32:
msg.oneofFixed32 = 106;
break;
- case Message3_O_OneOfCase_OneofFixed64:
+ case Message2_O_OneOfCase_OneofFixed64:
msg.oneofFixed64 = 107;
break;
- case Message3_O_OneOfCase_OneofSfixed32:
+ case Message2_O_OneOfCase_OneofSfixed32:
msg.oneofSfixed32 = 108;
break;
- case Message3_O_OneOfCase_OneofSfixed64:
+ case Message2_O_OneOfCase_OneofSfixed64:
msg.oneofSfixed64 = 109;
break;
- case Message3_O_OneOfCase_OneofFloat:
+ case Message2_O_OneOfCase_OneofFloat:
msg.oneofFloat = 110.0f;
break;
- case Message3_O_OneOfCase_OneofDouble:
+ case Message2_O_OneOfCase_OneofDouble:
msg.oneofDouble = 111.0;
break;
- case Message3_O_OneOfCase_OneofBool:
+ case Message2_O_OneOfCase_OneofBool:
msg.oneofBool = YES;
break;
- case Message3_O_OneOfCase_OneofString:
+ case Message2_O_OneOfCase_OneofString:
msg.oneofString = oneofStringDefault;
break;
- case Message3_O_OneOfCase_OneofBytes:
+ case Message2_O_OneOfCase_OneofBytes:
msg.oneofBytes = oneofBytesDefault;
break;
- case Message3_O_OneOfCase_OneofEnum:
+ case Message2_O_OneOfCase_OneofEnum:
msg.oneofEnum = Message3_Enum_Baz;
break;
default:
@@ -2200,14 +2200,16 @@
XCTAssertEqual(msg.oneofEnum, Message2_Enum_Baz, "Loop: %zd", i);
}
- // We special case nil on string, data, message, ensure they work as expected.
- // i.e. - it clears the case.
+ // We special case nil on string, data, group, message, ensure they work as
+ // expected. i.e. - it clears the case.
msg.oneofString = nil;
- XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase_GPBUnsetOneOfCase);
+ XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase_GPBUnsetOneOfCase);
msg.oneofBytes = nil;
- XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase_GPBUnsetOneOfCase);
+ XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase_GPBUnsetOneOfCase);
+ msg.oneofGroup = nil;
+ XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase_GPBUnsetOneOfCase);
msg.oneofMessage = nil;
- XCTAssertEqual(msg.oOneOfCase, Message3_O_OneOfCase_GPBUnsetOneOfCase);
+ XCTAssertEqual(msg.oOneOfCase, Message2_O_OneOfCase_GPBUnsetOneOfCase);
[msg release];
}