2 #include "libmesh/utility.h" 17 CPPUNIT_TEST( testSet );
18 CPPUNIT_TEST_SUITE_END();
25 s.insert(std::make_unique<int>(1));
26 s.insert(std::make_unique<int>(2));
27 s.insert(std::make_unique<int>(3));
28 s.insert(std::make_unique<int>(3));
32 int * first = s.begin()->get();
33 auto result = s.find(first);
34 CPPUNIT_ASSERT(result != s.end());
35 CPPUNIT_ASSERT(result->get() == first);
39 CPPUNIT_ASSERT(s.count(first) == 1);
43 auto four = std::make_unique<int>(4);
47 s.insert(std::move(four));
48 CPPUNIT_ASSERT(s.size() == 5);
52 s.insert(std::move(four));
53 CPPUNIT_ASSERT(s.size() == 6);
57 s.insert(std::move(four));
58 CPPUNIT_ASSERT(s.size() == 6);
The libMesh namespace provides an interface to certain functionality in the library.
CPPUNIT_TEST_SUITE_REGISTRATION(TransparentComparatorTest)
Struct which defines a custom comparison object that can be used with std::sets of std::unique_ptrs...