MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / TestPartResultTypeToString

Function TestPartResultTypeToString

source/test/gtest/src/gtest.cc:3103–3120  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

3101// to "Failure", as the user usually doesn't care about the difference
3102// between the two when viewing the test result.
3103static 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
3122namespace internal {
3123namespace {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected