61 Array<std::string> validValues(tuple<std::string>(
"mountain dew",
"pepsi",
"coke",
"fanta"));
64 testingList->set(
"string param",
"fanta",
"parameter for testing string conditions", stringVali1);
69 testingList->set(
"string param",
"coke");
75 testingList->set(
"double param", 5.0,
"parameter for testing number conditions");
80 testingList->set(
"double param", -1.0);
86 testingList->set(
"double param", 101.0);
92 testingList->set(
"bool param",
true,
"parameter for testing bool conditions");
96 testingList->set(
"bool param",
false);
104 testingList->set(
"double param", -1.0);
113 testingList->set(
"bool param",
true);
119 testingList->set(
"bool param",
false);
122 testingList->set(
"string param",
"fanta");
129 testingList->set(
"bool param",
true);
138 Array<std::string> validValues(tuple<std::string>(
"mountain dew",
"pepsi",
"coke",
"fanta"));
141 testingList->set(
"string param",
"fanta",
"parameter for testing string conditions", stringVali1);
147 TEST_ASSERT(stringParameters.find(testingList->getEntryRCP(
"string param")) != stringParameters.end());
152 testingList->set(
"double param", 5.0,
"parameter for testing number conditions");
157 TEST_ASSERT(numberParameters.find(testingList->getEntryRCP(
"double param")) != numberParameters.end());
162 testingList->set(
"bool param",
true,
"parameter for testing bool conditions");
167 TEST_ASSERT(boolParameters.find(testingList->getEntryRCP(
"bool param")) != boolParameters.end());
175 TEST_ASSERT(notParameters.find(testingList->getEntryRCP(
"double param")) != notParameters.end());
184 TEST_ASSERT(andParameters.find(testingList->getEntryRCP(
"string param")) != andParameters.end());
185 TEST_ASSERT(andParameters.find(testingList->getEntryRCP(
"bool param")) != andParameters.end());
193 TEST_ASSERT(orParameters.find(testingList->getEntryRCP(
"string param")) != orParameters.end());
194 TEST_ASSERT(orParameters.find(testingList->getEntryRCP(
"bool param")) != orParameters.end());
203 TEST_ASSERT(equalsParameters.find(testingList->getEntryRCP(
"double param")) != equalsParameters.end());
204 TEST_ASSERT(equalsParameters.find(testingList->getEntryRCP(
"bool param")) != equalsParameters.end());
209 equalsCon1->addCondition(orCon1);
212 TEST_ASSERT(equalsParameters2.find(testingList->getEntryRCP(
"string param")) != equalsParameters2.end());
213 TEST_ASSERT(equalsParameters2.find(testingList->getEntryRCP(
"double param")) != equalsParameters2.end());
214 TEST_ASSERT(equalsParameters2.find(testingList->getEntryRCP(
"bool param")) != equalsParameters2.end());
222 testingList->set(
"double param",1.0);
223 testingList->set(
"string param",
"awesome");
225 testingList2->set(
"bool param",
true);
#define TEST_ASSERT(v1)
Assert the given statement is true.
#define TEST_THROW(code, ExceptType)
Assert that the statement 'code' throws the exception 'ExceptType' (otherwise the test fails).
Templated Parameter List class.
Standard Conditions to be used.
#define TEUCHOS_UNIT_TEST(TEST_GROUP, TEST_NAME)
Macro for defining a (non-templated) unit test.
A Bool Logic Condition that returns the result or perfroming a logical AND on the conditions.
Replacement for std::vector that is compatible with the Teuchos Memory Management classes.
A Bool Condition is a Parameter Condition that evaluates whether or not a Boolean parameter is ture.
std::set< RCP< const ParameterEntry >, RCPConstComp > ConstParameterEntryList
A list of dependents.
A Bool Logic Condition that returns the result or perfroming a logical EQUALS on the conditions.
A Not condition returns the result of performing a logical NOT on a given condition.
A Number Condition is a Parameter Condition that evaluates whether or not a number parameter is great...
A Bool Logic Condition that returns the result or perfroming a logical OR on the conditions.
A list of parameters of arbitrary type.
Smart reference counting pointer class for automatic garbage collection.
A String Condition is a Parameter Condition that evaluates whether or not a string parameter has take...
A simple validator that only allows certain string values to be choosen or simply enforces that a par...
A simple function object that subtracts a specififed value from the given arguement in the runFunctio...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.