52 const int local_num_options = 6;
63 const char* local_SOptions[local_num_options] = {
74 namespace AbstractLinAlgPack {
78 ,
const char opt_grp_name[] )
79 : OptionsFromStreamPack::SetOptionsFromStreamNode(
80 opt_grp_name, local_num_options, local_SOptions )
81 , OptionsFromStreamPack::SetOptionsToTargetBase<
93 const std::string &option = option_value.c_str();
94 if( option ==
"PRINT_NONE" )
95 target().print_tests( target_t::PRINT_NONE );
96 else if( option ==
"PRINT_BASIC" )
97 target().print_tests( target_t::PRINT_BASIC );
98 else if( option ==
"PRINT_MORE" )
99 target().print_tests( target_t::PRINT_MORE );
100 else if( option ==
"PRINT_ALL" )
101 target().print_tests( target_t::PRINT_ALL );
104 true, std::invalid_argument
105 ,
"Error, incorrect value for "
106 "\"print_tests\". Only the options "
107 "PRINT_NONE, PRINT_BASIS, PRINT_MORE and PRINT_ALL are allowed" );
120 case NUM_RANDOM_TESTS:
121 target().num_random_tests(
std::abs(::std::atoi(option_value.c_str())));
124 target().warning_tol(std::fabs(std::atof(option_value.c_str())));
127 target().error_tol(std::fabs(std::atof(option_value.c_str())));
bool StringToBool(const char *opt_name, const char *str)
Convert a string "true" or "false" into bool #true# or #false#.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
void abs(DVectorSlice *vs_lhs, const DVectorSlice &vs_rhs)
vs_lhs = abs(vs_rhs)
void setOption(int option_num, const std::string &option_value)
Overridden from SetOptionsFromStreamNode.
Testing class for BasisSystem interface.
BasisSystemTester & target()
BasisSystemTesterSetOptions(BasisSystemTester *target=0, const char opt_grp_name[]="BasisSystemTester")
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
const std::string & option_value(OptionsGroup::const_iterator &itr)