summaryrefslogtreecommitdiffstats
path: root/googletest/test/googletest-printers-test.cc
diff options
context:
space:
mode:
authorAlexander Nikforov <nikiforov.al@gmail.com>2023-03-07 00:34:55 (GMT)
committerAlexander Nikforov <nikiforov.al@gmail.com>2023-03-07 00:34:55 (GMT)
commit92f0d72507801f2d47533bfb2ad8960d93ed0224 (patch)
treee55a95fdffae4aca51852320330a8f1e6b915a22 /googletest/test/googletest-printers-test.cc
parent2d4f208765af7fa376b878860a7677ecc0bc390a (diff)
downloadgoogletest-92f0d72507801f2d47533bfb2ad8960d93ed0224.zip
googletest-92f0d72507801f2d47533bfb2ad8960d93ed0224.tar.gz
googletest-92f0d72507801f2d47533bfb2ad8960d93ed0224.tar.bz2
__cpp_char8_t does not cover std::u8string implementation, but __cpp_lib_char8_t doesrefs/pull/4182/head
Diffstat (limited to 'googletest/test/googletest-printers-test.cc')
-rw-r--r--googletest/test/googletest-printers-test.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/googletest/test/googletest-printers-test.cc b/googletest/test/googletest-printers-test.cc
index 34aa924..23c30f1 100644
--- a/googletest/test/googletest-printers-test.cc
+++ b/googletest/test/googletest-printers-test.cc
@@ -532,7 +532,9 @@ TEST(PrintU8StringTest, NonConst) {
EXPECT_EQ(PrintPointer(p) + " pointing to u8\"\\xE4\\xB8\\x96\"",
Print(static_cast<char8_t*>(p)));
}
+#endif
+#ifdef __cpp_lib_char8_t
// NULL u8 string.
TEST(PrintU8StringTest, Null) {
const char8_t* p = nullptr;
@@ -936,7 +938,7 @@ TEST(PrintWideStringTest, StringAmbiguousHex) {
}
#endif // GTEST_HAS_STD_WSTRING
-#ifdef __cpp_char8_t
+#ifdef __cpp_lib_char8_t
TEST(PrintStringTest, U8String) {
std::u8string str = u8"Hello, 世界";
EXPECT_EQ(str, str); // Verify EXPECT_EQ compiles with this type.