Returns the ANSI color code for the given color. COLOR_DEFAULT is an invalid input.
| 4055 | // Returns the ANSI color code for the given color. COLOR_DEFAULT is |
| 4056 | // an invalid input. |
| 4057 | const char* GetAnsiColorCode(GTestColor color) { |
| 4058 | switch (color) { |
| 4059 | case COLOR_RED: return "1"; |
| 4060 | case COLOR_GREEN: return "2"; |
| 4061 | case COLOR_YELLOW: return "3"; |
| 4062 | default: return NULL; |
| 4063 | }; |
| 4064 | } |
| 4065 | |
| 4066 | #endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE |
| 4067 |