Remove ColoredPrintf in higher verison 56/268056/6 accepted/tizen/unified/20211221.050653 submit/tizen/20211210.025024
authortaemin.yeom <taemin.yeom@samsung.com>
Wed, 15 Dec 2021 08:59:40 +0000 (17:59 +0900)
committertaemin.yeom <taemin.yeom@samsung.com>
Thu, 16 Dec 2021 02:09:19 +0000 (11:09 +0900)
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: I652007752eeb338c3c1a602c4f43fba95f550cd7
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
haltest/sensor-haltest.h

index a1f2e9f9c634088a934b8f32e2fd23049d46f564..3499367ae2cacf5ca6b3ffb005e8e7e93bac8595 100644 (file)
@@ -37,21 +37,36 @@ namespace testing
         extern void ColoredPrintf(GTestColor color, const char* fmt, ...);
     }
 }
-#endif
 
 #define SKIP_MESSAGE(fmt, args...) \
 do { \
-    testing::internal::ColoredPrintf(testing::internal::COLOR_YELLOW, "[  SKIPPED ] "); \
-    testing::internal::ColoredPrintf(testing::internal::COLOR_YELLOW, fmt, ##args); \
-    testing::internal::ColoredPrintf(testing::internal::COLOR_YELLOW, "\n"); \
+       testing::internal::ColoredPrintf(testing::internal::COLOR_YELLOW, "[  SKIPPED ] "); \
+       testing::internal::ColoredPrintf(testing::internal::COLOR_YELLOW, fmt, ##args); \
+       testing::internal::ColoredPrintf(testing::internal::COLOR_YELLOW, "\n"); \
+} while (0)
+
+#define DEBUG_MESSAGE(fmt, args...) \
+do { \
+       testing::internal::ColoredPrintf(testing::internal::COLOR_GREEN, "[    DEBUG ] "); \
+       testing::internal::ColoredPrintf(testing::internal::COLOR_DEFAULT, fmt, ##args); \
+       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 { \
-    testing::internal::ColoredPrintf(testing::internal::COLOR_GREEN, "[    DEBUG ] "); \
-    testing::internal::ColoredPrintf(testing::internal::COLOR_DEFAULT, fmt, ##args); \
-    testing::internal::ColoredPrintf(testing::internal::COLOR_DEFAULT, "\n"); \
+       printf("[    DEBUG ] "); \
+       printf(fmt, ##args); \
+       printf("\n"); \
 } while (0)
+#endif
 
 #define SKIP_NO_FEATURE() \
 do { \