Definition at line 10 of file parameters_test.C.
◆ CPPUNIT_TEST() [1/4]
ParametersTest::CPPUNIT_TEST |
( |
testInt |
| ) |
|
◆ CPPUNIT_TEST() [2/4]
◆ CPPUNIT_TEST() [3/4]
◆ CPPUNIT_TEST() [4/4]
ParametersTest::CPPUNIT_TEST |
( |
testMap |
| ) |
|
◆ CPPUNIT_TEST_SUITE_END()
ParametersTest::CPPUNIT_TEST_SUITE_END |
( |
| ) |
|
◆ LIBMESH_CPPUNIT_TEST_SUITE()
◆ setUp()
void ParametersTest::setUp |
( |
| ) |
|
|
inline |
◆ tearDown()
void ParametersTest::tearDown |
( |
| ) |
|
|
inline |
◆ testDouble()
void ParametersTest::testDouble |
( |
| ) |
|
|
inline |
◆ testFloat()
void ParametersTest::testFloat |
( |
| ) |
|
|
inline |
◆ testInt()
void ParametersTest::testInt |
( |
| ) |
|
|
inline |
◆ testMap()
void ParametersTest::testMap |
( |
| ) |
|
|
inline |
Definition at line 49 of file parameters_test.C.
References libMesh::Parameters::get(), and libMesh::Parameters::set().
55 std::map<int, std::string> m;
58 param.
set<std::map<int, std::string>>(
"mymap") = m;
59 const std::map<int, std::string> & gotten =
60 param.
get<std::map<int, std::string>>(
"mymap");
62 CPPUNIT_ASSERT_EQUAL(gotten.size(), std::size_t(2));
63 CPPUNIT_ASSERT_EQUAL(gotten.at(2), std::string(
"two"));
64 CPPUNIT_ASSERT_EQUAL(gotten.at(4), std::string(
"four"));
This class provides the ability to map between arbitrary, user-defined strings and several data types...
const T & get(std::string_view) const
T & set(const std::string &)
◆ testScalar()
template<typename T >
void ParametersTest::testScalar |
( |
| ) |
|
|
inline |
Definition at line 32 of file parameters_test.C.
References libMesh::Parameters::get(), and libMesh::Parameters::set().
37 T t = 10, t_orig = 10;
39 param.
set<T>(
"first") = t;
43 param.
set<T>(
"second") = t;
45 CPPUNIT_ASSERT_EQUAL(t_orig, param.
get<T>(
"first"));
46 CPPUNIT_ASSERT_EQUAL(t, param.
get<T>(
"second"));
This class provides the ability to map between arbitrary, user-defined strings and several data types...
const T & get(std::string_view) const
T & set(const std::string &)
The documentation for this class was generated from the following file: