Returns the ANSI color code for the given color. COLOR_DEFAULT is an invalid input.
| 3874 | // Returns the ANSI color code for the given color. COLOR_DEFAULT is |
| 3875 | // an invalid input. |
| 3876 | const char* GetAnsiColorCode(GTestColor color) { |
| 3877 | switch (color) { |
| 3878 | case COLOR_RED: return "1"; |
| 3879 | case COLOR_GREEN: return "2"; |
| 3880 | case COLOR_YELLOW: return "3"; |
| 3881 | default: return NULL; |
| 3882 | }; |
| 3883 | } |
| 3884 | |
| 3885 | #endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE |
| 3886 |