MCPcopy Create free account
hub / github.com/BVLC/caffe / TestPartResultTypeToString

Function TestPartResultTypeToString

src/gtest/gtest-all.cpp:3803–3818  ·  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

3801// to "Failure", as the user usually doesn't care about the difference
3802// between the two when viewing the test result.
3803static 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.
3821static internal::String PrintTestPartResultToString(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected