+ DALI_TEST_EQUALS(counted->ReferenceCount(), 2, TEST_LOCATION);
+
+ counted2 = nullptr;
+ DALI_TEST_EQUALS(g_destructionCount, 0u, TEST_LOCATION);
+ DALI_TEST_EQUALS(counted->ReferenceCount(), 1, TEST_LOCATION);
+
+ counted = nullptr;
+ DALI_TEST_EQUALS(g_destructionCount, 1u, TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliIntrusivePtrMoveConstructor(void)
+{
+ IntrusivePtr<TestObject> testPtr(new TestObject);
+ DALI_TEST_EQUALS(testPtr->ReferenceCount(), 1, TEST_LOCATION);
+ DALI_TEST_EQUALS(testPtr->data, 201, TEST_LOCATION);
+
+ IntrusivePtr<TestObject> movePtr = std::move(testPtr);
+ DALI_TEST_EQUALS(movePtr->ReferenceCount(), 1, TEST_LOCATION);
+ DALI_TEST_EQUALS(movePtr->data, 201, TEST_LOCATION);
+ DALI_TEST_CHECK(!testPtr);
+
+ IntrusivePtr<TestObject> anotherTestPtr(new TestObject);
+ DALI_TEST_EQUALS(anotherTestPtr->ReferenceCount(), 1, TEST_LOCATION);
+ DALI_TEST_EQUALS(anotherTestPtr->data, 201, TEST_LOCATION);
+ IntrusivePtr<TestObject> anotherMovePtr = std::move(anotherTestPtr);
+ DALI_TEST_EQUALS(anotherMovePtr->ReferenceCount(), 1, TEST_LOCATION);
+ DALI_TEST_EQUALS(anotherMovePtr->data, 201, TEST_LOCATION);
+ DALI_TEST_CHECK(!anotherTestPtr.Get());
+
+ IntrusivePtr<CountedSubclass> countedSubclass(new CountedSubclass);
+ DALI_TEST_EQUALS(countedSubclass->ReferenceCount(), 1, TEST_LOCATION);
+
+ IntrusivePtr<Counted> countedMovePtr = std::move(countedSubclass);
+ DALI_TEST_EQUALS(countedMovePtr->ReferenceCount(), 1, TEST_LOCATION);
+ DALI_TEST_CHECK(!countedSubclass);