Run clang-format on conformance_objc.m.

pull/10736/head
Thomas Van Lenten 2 years ago
parent 2b42bea6e7
commit d459155f1d
  1. 21
      conformance/conformance_objc.m

@ -56,8 +56,7 @@ static NSData *CheckedReadDataOfLength(NSFileHandle *handle, NSUInteger numBytes
return nil; // EOF.
}
if (dataLen != numBytes) {
Die(@"Failed to read the request length (%d), only got: %@",
numBytes, data);
Die(@"Failed to read the request length (%d), only got: %@", numBytes, data);
}
return data;
}
@ -76,7 +75,8 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
Class msgClass = nil;
if ([request.messageType isEqual:@"protobuf_test_messages.proto3.TestAllTypesProto3"]) {
msgClass = [Proto3TestAllTypesProto3 class];
} else if ([request.messageType isEqual:@"protobuf_test_messages.proto2.TestAllTypesProto2"]) {
} else if ([request.messageType
isEqual:@"protobuf_test_messages.proto2.TestAllTypesProto2"]) {
msgClass = [Proto2TestAllTypesProto2 class];
} else {
response.runtimeError =
@ -87,8 +87,7 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
NSError *error = nil;
testMessage = [msgClass parseFromData:request.protobufPayload error:&error];
if (!testMessage) {
response.parseError =
[NSString stringWithFormat:@"Parse error: %@", error];
response.parseError = [NSString stringWithFormat:@"Parse error: %@", error];
}
break;
}
@ -98,9 +97,8 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
break;
case ConformanceRequest_Payload_OneOfCase_JspbPayload:
response.skipped =
@"ConformanceRequest had a jspb_payload ConformanceRequest.payload;"
" those aren't supposed to happen with opensource.";
response.skipped = @"ConformanceRequest had a jspb_payload ConformanceRequest.payload;"
" those aren't supposed to happen with opensource.";
break;
case ConformanceRequest_Payload_OneOfCase_TextPayload:
@ -120,7 +118,7 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
response.protobufPayload = testMessage.data;
if (!response.protobufPayload) {
response.serializeError =
[NSString stringWithFormat:@"Failed to make data from: %@", testMessage];
[NSString stringWithFormat:@"Failed to make data from: %@", testMessage];
}
break;
@ -131,7 +129,7 @@ static ConformanceResponse *DoTest(ConformanceRequest *request) {
case ConformanceWireFormat_Jspb:
response.skipped =
@"ConformanceRequest had a requested_output_format of JSPB WireFormat; that"
" isn't supposed to happen with opensource.";
" isn't supposed to happen with opensource.";
break;
case ConformanceWireFormat_TextFormat:
@ -173,8 +171,7 @@ static BOOL DoTestIo(NSFileHandle *input, NSFileHandle *output) {
}
NSError *error = nil;
ConformanceRequest *request = [ConformanceRequest parseFromData:data
error:&error];
ConformanceRequest *request = [ConformanceRequest parseFromData:data error:&error];
if (!request) {
Die(@"Failed to parse the message data: %@", error);
}

Loading…
Cancel
Save