Returns the ANSI color code for the given color. COLOR_DEFAULT is an invalid input.
| 2899 | // Returns the ANSI color code for the given color. COLOR_DEFAULT is |
| 2900 | // an invalid input. |
| 2901 | const char* GetAnsiColorCode(GTestColor color) { |
| 2902 | switch (color) { |
| 2903 | case COLOR_RED: return "1"; |
| 2904 | case COLOR_GREEN: return "2"; |
| 2905 | case COLOR_YELLOW: return "3"; |
| 2906 | default: return NULL; |
| 2907 | }; |
| 2908 | } |
| 2909 | |
| 2910 | #endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE |
| 2911 |