tests: Use MakeUnique to construct objects owned by unique_ptrs

This commit is contained in:
practicalswift
2018-09-21 11:03:21 +02:00
parent 8f464549c4
commit b6718e373e
9 changed files with 20 additions and 15 deletions

View File

@@ -163,7 +163,7 @@ private:
BOOST_AUTO_TEST_CASE(lockedpool_tests_mock)
{
// Test over three virtual arenas, of which one will succeed being locked
std::unique_ptr<LockedPageAllocator> x(new TestLockedPageAllocator(3, 1));
std::unique_ptr<LockedPageAllocator> x = MakeUnique<TestLockedPageAllocator>(3, 1);
LockedPool pool(std::move(x));
BOOST_CHECK(pool.stats().total == 0);
BOOST_CHECK(pool.stats().locked == 0);