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.
| 3982 | // to "Failure", as the user usually doesn't care about the difference |
| 3983 | // between the two when viewing the test result. |
| 3984 | static const char * TestPartResultTypeToString(TestPartResult::Type type) { |
| 3985 | switch (type) { |
| 3986 | case TestPartResult::kSuccess: |
| 3987 | return "Success"; |
| 3988 | |
| 3989 | case TestPartResult::kNonFatalFailure: |
| 3990 | case TestPartResult::kFatalFailure: |
| 3991 | #ifdef _MSC_VER |
| 3992 | return "error: "; |
| 3993 | #else |
| 3994 | return "Failure\n"; |
| 3995 | #endif |
| 3996 | default: |
| 3997 | return "Unknown result type"; |
| 3998 | } |
| 3999 | } |
| 4000 | |
| 4001 | namespace internal { |
| 4002 |
no outgoing calls
no test coverage detected