From edfd0b5169dc335380ecf43953fdf73f81bcda90 Mon Sep 17 00:00:00 2001 From: "taemin.yeom" Date: Wed, 15 Dec 2021 18:13:51 +0900 Subject: [PATCH] Remove ColoredPrintf in higher verison It was changed to internal API in GTEST 1.11.0 Do not use ColoredPrintf in higher gtest verison In GTEST 1.11.0, internal gtest APIs have been changed. Change-Id: Idffc5cfecd2432be0924104e76acfc15c4ae8065 Signed-off-by: taemin.yeom --- haltest/haltest.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/haltest/haltest.h b/haltest/haltest.h index f78f328..0013d3f 100644 --- a/haltest/haltest.h +++ b/haltest/haltest.h @@ -35,7 +35,6 @@ namespace testing extern void ColoredPrintf(GTestColor color, const char* fmt, ...); } } -#endif #define SKIP_MESSAGE(fmt, args...) \ do { \ @@ -51,6 +50,22 @@ do { \ testing::internal::ColoredPrintf(testing::internal::COLOR_DEFAULT, "\n"); \ } while (0) +#else // (GTEST_VERSION_MAJOR < 1 || (GTEST_VERSION_MAJOR == 1 && GTEST_VERSION_MINOR < 10)) +#define SKIP_MESSAGE(fmt, args...) \ +do { \ + printf("[ SKIPPED ] "); \ + printf(fmt, ##args); \ + printf("\n"); \ +} while (0) + +#define DEBUG_MESSAGE(fmt, args...) \ +do { \ + printf("[ DEBUG ] "); \ + printf(fmt, ##args); \ + printf("\n"); \ +} while (0) +#endif + #define FEATURE_BATTERY "http://tizen.org/feature/battery" #define FEATURE_DISPLAY "http://tizen.org/feature/display" #define FEATURE_LED "http://tizen.org/feature/led" -- 2.7.4