14 std::cout << comline.
LongUsage() << std::endl;
18 std::string sverb = comline.
GetOption(
"verbosity");
19 std::istringstream Istr(sverb);
21 if(verb_level < 0 || verb_level > 3)
23 double lower_limit = -std::numeric_limits<double>::max();
24 double upper_limit = std::numeric_limits<double>::max();
25 std::string range = comline.
GetOption(
"range");
26 std::string ident = comline.
GetOption(
"identifier");
27 std::string name = comline.
GetOption(
"name");
32 std::cerr <<
"Identifier: " << ident << std::endl;
33 comline.
ProcessRange<
double>(lower_limit,upper_limit,range);
35 std::cerr <<
"Processed range: (" << lower_limit <<
":" << upper_limit
38 while(std::getline(std::cin,line)){
39 std::string::size_type
x = line.find(ident);
40 if(x != std::string::npos){
42 if(x != std::string::npos){
43 std::string snumbers = line.substr(x+1);
44 std::istringstream NumIn(snumbers);
47 passed = ((cnum >= lower_limit) && (cnum <= upper_limit));
49 std::cout << name <<
" = " << (passed ? 1 : 0) << std::endl;
50 if((verb_level > 1) && !passed){
51 std::cerr <<
"Test failed: " << cnum <<
" is not in range (" 52 << lower_limit <<
":" << upper_limit <<
")" << std::endl;
64 int main(
int argc,
char *argv[])
int ProcessOptions()
Processes all command line tokens.
std::string GetOption(const char &s)
Get the value of an option.
int main(int argc, char *argv[])
The ComLineObject for the example programs.
void ProcessRange(NumType &t1, NumType &t2, const std::string stinter)
Process a range in the format "t1:t2".
int CheckResults(int argc, char *argv[])
Check numerical results utility.
Performs various checks on numerical test results.
Defines MPI-specific parallel global and program classes.
void const size_t const size_t const size_t const double const double * x
void Initialize()
This is where the actual options and arguments are described.
std::string LongUsage()
Generate long usage string.