diff --git a/options.cc b/options.cc index 2571b5bc66b7df283f5d9b11d19d4da2278c26e1..dca15b1745702ac487153bef4cbbaf22b2fd9d9a 100644 --- a/options.cc +++ b/options.cc @@ -166,62 +166,3 @@ namespace Options { } } -// -// And now for the test stub... -// -#if defined(TESTING) - -using namespace Opts; - -Option<bool> verbose(string("-V,--verbose"), false, - string("switch on diagnostic messages"), - false, no_argument); -Option<bool> help(string("-h,--help"), false, - string("display this message"), - false, no_argument); -Option<float> dof(string("-d,--dof"), 100.0, - string("number of degrees of freedom"), - true, requires_argument); -Option<string> mask(string("-m,--mask"), string("mask"), - string("brain mask volume"), - true, requires_argument); -Option<string> resid(string("-r,--res"), string("res4d"), - string("4d `residual-of-fit' image"), - true, requires_argument); - -int main(unsigned int argc, char **argv) { - - OptionParser options("options", - "-d <number> --mask <filename> --res <filename>"); - - try { - - options.add(verbose); - options.add(help); - options.add(dof); - options.add(mask); - options.add(resid); - - for(unsigned int a = options.parse_command_line(argc, argv); a < argc; a++) - cout << argv[a] << endl; - - if(help.value()) - options.usage(); - - if(verbose.value()) { - cout << "verbose = " << verbose.value() << endl; - cout << "help = " << help.value() << endl; - cout << "dof = " << dof.value() << endl; - cout << "mask = " << mask.value() << endl; - cout << "resid = " << resid.value() << endl; - } - - } catch(X_OptionError& e) { - options.usage(); - cerr << endl << e.what() << endl; - } catch(std::exception &e) { - cerr << e.what() << endl; - } -} - -#endif