Returns the ANSI color code for the given color. COLOR_DEFAULT is an invalid input.
| 4467 | // Returns the ANSI color code for the given color. COLOR_DEFAULT is |
| 4468 | // an invalid input. |
| 4469 | static const char* GetAnsiColorCode(GTestColor color) { |
| 4470 | switch (color) { |
| 4471 | case COLOR_RED: return "1"; |
| 4472 | case COLOR_GREEN: return "2"; |
| 4473 | case COLOR_YELLOW: return "3"; |
| 4474 | default: |
| 4475 | return nullptr; |
| 4476 | } |
| 4477 | } |
| 4478 | |
| 4479 | #endif // GTEST_OS_WINDOWS && !GTEST_OS_WINDOWS_MOBILE |
| 4480 |