- Timestamp:
- Nov 4, 2015, 10:25:42 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/test/core/object/StrongPtrTest.cc
r10744 r10765 111 111 void isNull(const StrongPtr<DestroyableTest> strongPtr) 112 112 { 113 EXPECT_TRUE(strongPtr == NULL);113 EXPECT_TRUE(strongPtr == nullptr); 114 114 EXPECT_TRUE(strongPtr == 0); 115 115 EXPECT_TRUE(!strongPtr); 116 EXPECT_FALSE(strongPtr != NULL);116 EXPECT_FALSE(strongPtr != nullptr); 117 117 EXPECT_FALSE(strongPtr != 0); 118 118 EXPECT_FALSE(strongPtr); … … 126 126 } 127 127 { 128 StrongPtr<DestroyableTest> strongPtr = NULL;128 StrongPtr<DestroyableTest> strongPtr = nullptr; 129 129 isNull(strongPtr); 130 130 } 131 131 { 132 132 StrongPtr<DestroyableTest> strongPtr; 133 strongPtr = NULL;133 strongPtr = nullptr; 134 134 isNull(strongPtr); 135 135 } … … 150 150 DestroyableTest* test = new DestroyableTest(destroyed); 151 151 StrongPtr<DestroyableTest> strongPtr = test; 152 EXPECT_FALSE(strongPtr == NULL);152 EXPECT_FALSE(strongPtr == nullptr); 153 153 EXPECT_FALSE(strongPtr == 0); 154 154 EXPECT_FALSE(!strongPtr); 155 EXPECT_TRUE(strongPtr != NULL);155 EXPECT_TRUE(strongPtr != nullptr); 156 156 EXPECT_TRUE(strongPtr != 0); 157 157 EXPECT_TRUE(strongPtr); … … 166 166 // default 167 167 StrongPtr<DestroyableTest> strongPtr1; 168 EXPECT_EQ( NULL, strongPtr1.get());168 EXPECT_EQ(nullptr, strongPtr1.get()); 169 169 170 170 // pointer … … 277 277 EXPECT_EQ(1u, test->getReferenceCount()); 278 278 strongPtr.reset(); 279 EXPECT_EQ( NULL, strongPtr.get());279 EXPECT_EQ(nullptr, strongPtr.get()); 280 280 EXPECT_EQ(0u, test->getReferenceCount()); 281 281
Note: See TracChangeset
for help on using the changeset viewer.