mirror of
https://github.com/google/googletest.git
synced 2024-12-27 02:01:25 +08:00
Fix compilation of googletest-printers-test.cc when using -Wundef
#3267 PiperOrigin-RevId: 514858420 Change-Id: Ic712aafad25f5e63ae48f647557de95cef890978
This commit is contained in:
parent
cf4f4400db
commit
678c1c73de
@ -1796,7 +1796,8 @@ TEST(UniversalPrintTest, SmartPointers) {
|
||||
std::shared_ptr<int> p3(new int(1979));
|
||||
EXPECT_EQ("(ptr = " + PrintPointer(p3.get()) + ", value = 1979)",
|
||||
PrintToString(p3));
|
||||
#if __cpp_lib_shared_ptr_arrays >= 201611L
|
||||
#if defined(__cpp_lib_shared_ptr_arrays) && \
|
||||
(__cpp_lib_shared_ptr_arrays >= 201611L)
|
||||
std::shared_ptr<int[]> p4(new int[2]);
|
||||
EXPECT_EQ("(" + PrintPointer(p4.get()) + ")", PrintToString(p4));
|
||||
#endif
|
||||
@ -1815,7 +1816,8 @@ TEST(UniversalPrintTest, SmartPointers) {
|
||||
EXPECT_EQ("(nullptr)", PrintToString(std::shared_ptr<const int>()));
|
||||
EXPECT_EQ("(nullptr)", PrintToString(std::shared_ptr<volatile int>()));
|
||||
EXPECT_EQ("(nullptr)", PrintToString(std::shared_ptr<volatile const int>()));
|
||||
#if __cpp_lib_shared_ptr_arrays >= 201611L
|
||||
#if defined(__cpp_lib_shared_ptr_arrays) && \
|
||||
(__cpp_lib_shared_ptr_arrays >= 201611L)
|
||||
EXPECT_EQ("(nullptr)", PrintToString(std::shared_ptr<int[]>()));
|
||||
EXPECT_EQ("(nullptr)", PrintToString(std::shared_ptr<const int[]>()));
|
||||
EXPECT_EQ("(nullptr)", PrintToString(std::shared_ptr<volatile int[]>()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user