Definition at line 13 of file transparent_comparator.C.
◆ CPPUNIT_TEST()
TransparentComparatorTest::CPPUNIT_TEST |
( |
testSet |
| ) |
|
◆ CPPUNIT_TEST_SUITE_END()
TransparentComparatorTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ LIBMESH_CPPUNIT_TEST_SUITE()
◆ testSet()
void TransparentComparatorTest::testSet |
( |
| ) |
|
|
inline |
Definition at line 20 of file transparent_comparator.C.
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);
Struct which defines a custom comparison object that can be used with std::sets of std::unique_ptrs...
The documentation for this class was generated from the following file: