OLD | NEW |
1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
2 // Copyright 2015 Google Inc. All rights reserved. | 2 // Copyright 2015 Google Inc. All rights reserved. |
3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 if (testMessage) { | 88 if (testMessage) { |
89 switch (request.requestedOutputFormat) { | 89 switch (request.requestedOutputFormat) { |
90 case WireFormat_GPBUnrecognizedEnumeratorValue: | 90 case WireFormat_GPBUnrecognizedEnumeratorValue: |
91 case WireFormat_Unspecified: | 91 case WireFormat_Unspecified: |
92 Die(@"Unrecognized/unspecified output format: %@", request); | 92 Die(@"Unrecognized/unspecified output format: %@", request); |
93 break; | 93 break; |
94 | 94 |
95 case WireFormat_Protobuf: | 95 case WireFormat_Protobuf: |
96 response.protobufPayload = testMessage.data; | 96 response.protobufPayload = testMessage.data; |
97 if (!response.protobufPayload) { | 97 if (!response.protobufPayload) { |
98 response.runtimeError = | 98 response.serializeError = |
99 [NSString stringWithFormat:@"Failed to make data from: %@", testMess
age]; | 99 [NSString stringWithFormat:@"Failed to make data from: %@", testMess
age]; |
100 } | 100 } |
101 break; | 101 break; |
102 | 102 |
103 case WireFormat_Json: | 103 case WireFormat_Json: |
104 response.skipped = @"ObjC doesn't support generating JSON"; | 104 response.skipped = @"ObjC doesn't support generating JSON"; |
105 break; | 105 break; |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 while (notDone) { | 170 while (notDone) { |
171 @autoreleasepool { | 171 @autoreleasepool { |
172 notDone = DoTestIo(input, output); | 172 notDone = DoTestIo(input, output); |
173 } | 173 } |
174 } | 174 } |
175 | 175 |
176 NSLog(@"Received EOF from test runner after %d tests, exiting.", testCount); | 176 NSLog(@"Received EOF from test runner after %d tests, exiting.", testCount); |
177 } | 177 } |
178 return 0; | 178 return 0; |
179 } | 179 } |
OLD | NEW |