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.
| 3101 | // to "Failure", as the user usually doesn't care about the difference |
| 3102 | // between the two when viewing the test result. |
| 3103 | static const char* TestPartResultTypeToString(TestPartResult::Type type) { |
| 3104 | switch (type) { |
| 3105 | case TestPartResult::kSkip: |
| 3106 | return "Skipped\n"; |
| 3107 | case TestPartResult::kSuccess: |
| 3108 | return "Success"; |
| 3109 | |
| 3110 | case TestPartResult::kNonFatalFailure: |
| 3111 | case TestPartResult::kFatalFailure: |
| 3112 | #ifdef _MSC_VER |
| 3113 | return "error: "; |
| 3114 | #else |
| 3115 | return "Failure\n"; |
| 3116 | #endif |
| 3117 | default: |
| 3118 | return "Unknown result type"; |
| 3119 | } |
| 3120 | } |
| 3121 | |
| 3122 | namespace internal { |
| 3123 | namespace { |
no outgoing calls
no test coverage detected