Skip to content

Commit

Permalink
Add another test
Browse files Browse the repository at this point in the history
  • Loading branch information
certik committed Apr 15, 2015
1 parent d112956 commit 537d2f9
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -137,6 +137,19 @@ TEUCHOS_UNIT_TEST( UniquePtr, assign3 )
#endif
}

TEUCHOS_UNIT_TEST( UniquePtr, assign4 )
{
UniquePtr<int> orig(new int(5));
bool t;
t = (*orig == 5);
TEST_ASSERT(t)
auto stolen = std::move(orig);
#ifdef TEUCHOS_DEBUG
TEST_THROW( t = (*orig == 5), DanglingReferenceError );
#endif
TEST_ASSERT(*stolen == 5);
}

TEUCHOS_UNIT_TEST( UniquePtr, getConst )
{
UniquePtr<A> a_uptr(new A);
Expand Down

0 comments on commit 537d2f9

Please sign in to comment.