diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-10-20 21:31:38 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-10-20 21:31:38 +0000 |
| commit | 6d5b4c162a2564fcd67f9b5cd5be4ed22a3dc575 (patch) | |
| tree | 942d1db600822a554ada8c6dd6953f58dfd4ba73 /Tests/TestApp/src | |
| parent | Updated readme (diff) | |
| download | DiligentEngine-6d5b4c162a2564fcd67f9b5cd5be4ed22a3dc575.tar.gz DiligentEngine-6d5b4c162a2564fcd67f9b5cd5be4ed22a3dc575.zip | |
Updated core; updated smart pointer test
Diffstat (limited to 'Tests/TestApp/src')
| -rw-r--r-- | Tests/TestApp/src/SmartPointerTest.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/TestApp/src/SmartPointerTest.cpp b/Tests/TestApp/src/SmartPointerTest.cpp index 27a73fb..6a049ff 100644 --- a/Tests/TestApp/src/SmartPointerTest.cpp +++ b/Tests/TestApp/src/SmartPointerTest.cpp @@ -298,7 +298,14 @@ SmartPointerTest::SmartPointerTest() : SmartPtr SP3(SP0); SmartPtr SP4(SP2); SmartPtr SP5(std::move(SP3)); + VERIFY_EXPR(!SP3); SmartPtr SP6(std::move(SP4)); + VERIFY_EXPR(!SP4); + + RefCntAutoPtr<DerivedObject> DerivedSP(MakeNewObj<DerivedObject>()); + SmartPtr SP7(DerivedSP); + SmartPtr SP8(std::move(DerivedSP)); + VERIFY_EXPR(!DerivedSP); } // Test Attach/Detach @@ -370,10 +377,17 @@ SmartPointerTest::SmartPointerTest() : SP4 = SP3; SmartPtr SP5; SP5 = std::move(SP4); + VERIFY_EXPR(!SP4); SP1 = pRawPtr2; SP1 = nullptr; SP1 = std::move(SP5); + VERIFY_EXPR(!SP5); + + RefCntAutoPtr<DerivedObject> DerivedSP(MakeNewObj<DerivedObject>()); + SP1 = DerivedSP; + SP2 = std::move(DerivedSP); + VERIFY_EXPR(!DerivedSP); } // Test logical operators |
