Converts a TestPartResult::Type enum to human-friendly string representation. Both kNonFatalFailure and kFatalFailure are translated to "Failure", as the user usually doesn't care about the difference between the two when viewing the test result.
| 4268 | // to "Failure", as the user usually doesn't care about the difference |
| 4269 | // between the two when viewing the test result. |
| 4270 | static const char * TestPartResultTypeToString(TestPartResult::Type type) { |
| 4271 | switch (type) { |
| 4272 | case TestPartResult::kSuccess: |
| 4273 | return "Success"; |
| 4274 | |
| 4275 | case TestPartResult::kNonFatalFailure: |
| 4276 | case TestPartResult::kFatalFailure: |
| 4277 | #ifdef _MSC_VER |
| 4278 | return "error: "; |
| 4279 | #else |
| 4280 | return "Failure\n"; |
| 4281 | #endif |
| 4282 | default: |
| 4283 | return "Unknown result type"; |
| 4284 | } |
| 4285 | } |
| 4286 | |
| 4287 | namespace internal { |
| 4288 |
no outgoing calls
no test coverage detected