diff --git a/targets/tests/NumericalTests/Utilities/TestCout/ColorOutput.h b/targets/tests/NumericalTests/Utilities/TestCout/ColorOutput.h new file mode 100644 index 0000000000000000000000000000000000000000..5daa8ac4baefceaca5f4f3baf5fd7ada79f9d66f --- /dev/null +++ b/targets/tests/NumericalTests/Utilities/TestCout/ColorOutput.h @@ -0,0 +1,26 @@ +#ifndef COLOR_OUTPUT_H +#define COLOR_OUTPUT_H + +#include <gtest/gtest.h> + +// https://stackoverflow.com/questions/16491675/how-to-send-custom-message-in-google-c-testing-framework/29155677#29155677 +namespace testing +{ + namespace internal + { + enum GTestColor { + COLOR_DEFAULT, + COLOR_RED, + COLOR_GREEN, + COLOR_YELLOW + }; + + // in case of unresoved external while using shared libraries + // add in gtest.h line 167 and 168: + // enum GTestColor; + // void GTEST_API_ ColoredPrintf(GTestColor color, const char* fmt, ...); + // see commit: 4c0ed885ceab18b9df7a2495c77a51e236aee6f1 + extern void ColoredPrintf(GTestColor color, const char* fmt, ...); + } +} +#endif \ No newline at end of file diff --git a/targets/tests/NumericalTests/Utilities/TestCout/TestCoutImp.h b/targets/tests/NumericalTests/Utilities/TestCout/TestCoutImp.h index 12265a08159013ff67586394253e6d6317b4564c..c59c44cbbc7692458baa63aa82b292f1c0928ca1 100644 --- a/targets/tests/NumericalTests/Utilities/TestCout/TestCoutImp.h +++ b/targets/tests/NumericalTests/Utilities/TestCout/TestCoutImp.h @@ -2,31 +2,11 @@ #define TEST_COUT_IMP_H #include "TestCout.h" +#include "ColorOutput.h" #include <sstream> #include <memory> -#include <gtest/gtest.h> -// https://stackoverflow.com/questions/16491675/how-to-send-custom-message-in-google-c-testing-framework/29155677#29155677 -namespace testing -{ - namespace internal - { - enum GTestColor { - COLOR_DEFAULT, - COLOR_RED, - COLOR_GREEN, - COLOR_YELLOW - }; - - // in case of unresoved external while using shared libraries - // add in gtest.h line 167 and 168: - // enum GTestColor; - // void GTEST_API_ ColoredPrintf(GTestColor color, const char* fmt, ...); - // see commit: 4c0ed885ceab18b9df7a2495c77a51e236aee6f1 - extern void ColoredPrintf(GTestColor color, const char* fmt, ...); - } -} class TestCoutImp : public TestCout {