68 vector<string> matchStems = {
"Match1",
"Match2",
"Match3",
"Match4"};
69 for(
size_t i = 0; i < matchStems.size(); i++)
71 string xmlFile = matchStems[i] +
".xml";
72 string yamlFile = matchStems[i] +
".yaml";
92 int correctInts[5] = {2, 3, 5, 7, 11};
94 double correctDoubles[5] = {2.718, 3.14159, 1.618, 1.23456789, 42.1337};
103 for(
int i = 0; i < 5; i++)
112 std::string correctStrings[5] = {
"2",
"3",
"5",
"7",
"imastring"};
113 double correctDoubles[5] = {2, 3, 1.618, 1.23456789, 42.1337};
119 for(
int i = 0; i < 5; i++)
121 if(stringArr[i] != correctStrings[i])
123 throw std::runtime_error(std::string(
"stringArray[") + std::to_string(i) +
"] is incorrect.");
125 if(doubleArr[i] != correctDoubles[i])
127 throw std::runtime_error(std::string(
"doubleArray value [") + std::to_string(i) +
"] is incorrect.");
#define TEST_NOTHROW(code)
Asserr that the statement 'code' does not thrown any excpetions.
T & get(const std::string &name, T def_value)
Return the parameter's value, or the default value if it is not there.
#define TEST_EQUALITY(v1, v2)
Assert the equality of v1 and v2.
#define TEST_THROW(code, ExceptType)
Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails)...
Simple helper functions that make it easy to read and write XML to and from a parameterlist.
Templated Parameter List class.
A list of parameters of arbitrary type.
TEUCHOS_UNIT_TEST(YAML, XmlEquivalence)
Defines basic traits for the scalar field type.
Smart reference counting pointer class for automatic garbage collection.
Teuchos::RCP< Teuchos::ParameterList > getParametersFromYamlFile(const std::string &yamlFileName)
Simple helper functions that make it easy to read and write Yaml to and from a parameterlist.
Reference-counted pointer class and non-member templated function implementations.
bool haveSameValuesUnordered(const Teuchos::ParameterList &lhs, const Teuchos::ParameterList &rhs, bool verbose)