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.
| 3801 | // to "Failure", as the user usually doesn't care about the difference |
| 3802 | // between the two when viewing the test result. |
| 3803 | static const char * TestPartResultTypeToString(TestPartResult::Type type) { |
| 3804 | switch (type) { |
| 3805 | case TestPartResult::kSuccess: |
| 3806 | return "Success"; |
| 3807 | |
| 3808 | case TestPartResult::kNonFatalFailure: |
| 3809 | case TestPartResult::kFatalFailure: |
| 3810 | #ifdef _MSC_VER |
| 3811 | return "error: "; |
| 3812 | #else |
| 3813 | return "Failure\n"; |
| 3814 | #endif |
| 3815 | default: |
| 3816 | return "Unknown result type"; |
| 3817 | } |
| 3818 | } |
| 3819 | |
| 3820 | // Prints a TestPartResult to a String. |
| 3821 | static internal::String PrintTestPartResultToString( |
no outgoing calls
no test coverage detected