10 #include <boost/program_options.hpp>
11 #include <fwk/CommandLineOptions.h>
12 #include <cppunit/extensions/HelperMacros.h>
13 #include <cppunit/ui/text/TestRunner.h>
19 using namespace CppUnit;
20 namespace po = boost::program_options;
24 main(
int argc,
char* argv[])
27 po::options_description desc(
"Usage:");
32 po::value<int>(&fpException),
33 "Unmask specific floating-point exceptions for debugging: "
34 "1=invalid-sqrt(-1), 4=div-by-0, 8=overflow.")
37 "switch on logging of all SQL queries")
42 po::store(po::parse_command_line(argc, argv, desc), vm);
44 }
catch (po::error& er) {
45 cerr <<
"Command line error : " << er.what() <<
'\n'
50 if (vm.count(
"help")) {
56 if (vm.count(
"fpexception"))
57 feenableexcept(fpException);
59 if (vm.count(
"fpexception"))
60 cerr <<
"floating-point exceptions will not be enabled on this architecture..." << endl;
63 fwk::CommandLineOptions::GetInstance().SetVariablesMap(vm);
65 TextUi::TestRunner runner;
66 TestFactoryRegistry& registry =
67 TestFactoryRegistry::getRegistry();
69 runner.addTest(registry.makeTest());
71 const bool ok = runner.run(
"",
false);
int main(int argc, char *argv[])