diff options
author | taemin.yeom <taemin.yeom@samsung.com> | 2021-12-15 17:59:40 +0900 |
---|---|---|
committer | taemin.yeom <taemin.yeom@samsung.com> | 2021-12-16 11:09:19 +0900 |
commit | 42e683f5d36ddd019289357fe580c2cbdc34daf3 (patch) | |
tree | 31d5efd662baf7dd320b149f1380a25ee998e61d | |
parent | 87f764d7d0448a658ec37fabde9d662593e915f8 (diff) | |
download | sensor-42e683f5d36ddd019289357fe580c2cbdc34daf3.tar.gz sensor-42e683f5d36ddd019289357fe580c2cbdc34daf3.tar.bz2 sensor-42e683f5d36ddd019289357fe580c2cbdc34daf3.zip |
Remove ColoredPrintf in higher verisonsubmit/tizen/20211210.025024accepted/tizen/unified/20211221.050653
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>
-rw-r--r-- | haltest/sensor-haltest.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/haltest/sensor-haltest.h b/haltest/sensor-haltest.h index a1f2e9f..3499367 100644 --- a/haltest/sensor-haltest.h +++ b/haltest/sensor-haltest.h @@ -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 { \ |