Changeset 10768 for code/branches/cpp11_v2/test
- Timestamp:
- Nov 6, 2015, 10:54:34 PM (9 years ago)
- Location:
- code/branches/cpp11_v2/test
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/test/core/command/CommandTest.cc
r10765 r10768 129 129 ModifyConsoleCommand("test").popObject(); 130 130 else if (a == 1) 131 ModifyConsoleCommand("test").setFunction(FunctorPtr( 0));131 ModifyConsoleCommand("test").setFunction(FunctorPtr(nullptr)); 132 132 else if (a == -1) 133 133 ModifyConsoleCommand("test").popFunction(); -
code/branches/cpp11_v2/test/core/object/StrongPtrTest.cc
r10765 r10768 112 112 { 113 113 EXPECT_TRUE(strongPtr == nullptr); 114 EXPECT_TRUE(strongPtr == 0);114 EXPECT_TRUE(strongPtr == nullptr); 115 115 EXPECT_TRUE(!strongPtr); 116 116 EXPECT_FALSE(strongPtr != nullptr); 117 EXPECT_FALSE(strongPtr != 0);117 EXPECT_FALSE(strongPtr != nullptr); 118 118 EXPECT_FALSE(strongPtr); 119 119 } … … 135 135 } 136 136 { 137 StrongPtr<DestroyableTest> strongPtr = 0;137 StrongPtr<DestroyableTest> strongPtr = nullptr; 138 138 isNull(strongPtr); 139 139 } 140 140 { 141 141 StrongPtr<DestroyableTest> strongPtr; 142 strongPtr = 0;142 strongPtr = nullptr; 143 143 isNull(strongPtr); 144 144 } … … 151 151 StrongPtr<DestroyableTest> strongPtr = test; 152 152 EXPECT_FALSE(strongPtr == nullptr); 153 EXPECT_FALSE(strongPtr == 0);153 EXPECT_FALSE(strongPtr == nullptr); 154 154 EXPECT_FALSE(!strongPtr); 155 155 EXPECT_TRUE(strongPtr != nullptr); 156 EXPECT_TRUE(strongPtr != 0);156 EXPECT_TRUE(strongPtr != nullptr); 157 157 EXPECT_TRUE(strongPtr); 158 158 test->destroy(); -
code/branches/cpp11_v2/test/core/object/WeakPtrTest.cc
r10765 r10768 67 67 { 68 68 EXPECT_TRUE(weakPtr == nullptr); 69 EXPECT_TRUE(weakPtr == 0);69 EXPECT_TRUE(weakPtr == nullptr); 70 70 EXPECT_TRUE(!weakPtr); 71 71 EXPECT_FALSE(weakPtr != nullptr); 72 EXPECT_FALSE(weakPtr != 0);72 EXPECT_FALSE(weakPtr != nullptr); 73 73 EXPECT_FALSE(weakPtr); 74 74 } … … 90 90 } 91 91 { 92 WeakPtr<DestroyableTest> weakPtr = 0;92 WeakPtr<DestroyableTest> weakPtr = nullptr; 93 93 isNull(weakPtr); 94 94 } 95 95 { 96 96 WeakPtr<DestroyableTest> weakPtr; 97 weakPtr = 0;97 weakPtr = nullptr; 98 98 isNull(weakPtr); 99 99 } … … 105 105 WeakPtr<DestroyableTest> weakPtr = test; 106 106 EXPECT_FALSE(weakPtr == nullptr); 107 EXPECT_FALSE(weakPtr == 0);107 EXPECT_FALSE(weakPtr == nullptr); 108 108 EXPECT_FALSE(!weakPtr); 109 109 EXPECT_TRUE(weakPtr != nullptr); 110 EXPECT_TRUE(weakPtr != 0);110 EXPECT_TRUE(weakPtr != nullptr); 111 111 EXPECT_TRUE(weakPtr); 112 112 test->destroy(); -
code/branches/cpp11_v2/test/util/SharedPtrTest.cc
r10765 r10768 41 41 { 42 42 SharedPtr<TestClass> test; 43 EXPECT_EQ( 0, test.get());43 EXPECT_EQ(nullptr, test.get()); 44 44 } 45 45 … … 91 91 92 92 SharedPtr<TestClass> test; 93 EXPECT_EQ( 0, test.get());93 EXPECT_EQ(nullptr, test.get()); 94 94 95 95 test = other; … … 105 105 106 106 SharedPtr<TestClass> test; 107 EXPECT_EQ( 0, test.get());107 EXPECT_EQ(nullptr, test.get()); 108 108 109 109 test = other; … … 138 138 { 139 139 SharedPtr<TestClass> test; 140 EXPECT_EQ( 0, test.get());140 EXPECT_EQ(nullptr, test.get()); 141 141 EXPECT_FALSE(test); 142 142 -
code/branches/cpp11_v2/test/util/SmallObjectAllocatorTest.cc
r9114 r10768 47 47 // create an integer 48 48 size_t* pointer = this->create(5); 49 ASSERT_NE((void*) 0, pointer);49 ASSERT_NE((void*)nullptr, pointer); 50 50 EXPECT_EQ(5u, *pointer); 51 51 } … … 55 55 // create an integer 56 56 size_t* pointer = this->create(5); 57 ASSERT_NE((void*) 0, pointer);57 ASSERT_NE((void*)nullptr, pointer); 58 58 EXPECT_EQ(5u, *pointer); 59 59 … … 228 228 // create an object 229 229 SmallObject* pointer = this->create(5); 230 ASSERT_NE((void*) 0, pointer);230 ASSERT_NE((void*)nullptr, pointer); 231 231 EXPECT_EQ(5u, pointer->getValue()); 232 232 EXPECT_EQ(5u, SmallObject::total_s); … … 239 239 // create an object 240 240 SmallObject* pointer = this->create(5); 241 ASSERT_NE((void*) 0, pointer);241 ASSERT_NE((void*)nullptr, pointer); 242 242 EXPECT_EQ(5u, pointer->getValue()); 243 243 EXPECT_EQ(5u, SmallObject::total_s);
Note: See TracChangeset
for help on using the changeset viewer.