#include "meshkit-test.h" #include "MKLibTests.h" #include "HeartBeatListenerTests.h" #include "MKControlTests.h" #include "MKCommModelTests.h" using namespace std; std::ostream *testLogH; /** Run the test suites */ int main(int argc, char *argv[]) { /* if(argc != 2) { cout << "Usage: " << argv[0] << " " << endl; return EXIT_FAILURE; } */ try { openTestLog(); Test::Suite ts; ts.add(auto_ptr(new MKLibTests())); ts.add(auto_ptr(new HeartBeatListenerTests())); ts.add(auto_ptr(new MKControlTests())); ts.add(auto_ptr(new MKCommModelTests())); /* ts.add(auto_ptr(new BatLibTests())); ts.add(auto_ptr(new StartStopTests(argv[1]))); ts.add(auto_ptr(new NeighborsTests())); ts.add(auto_ptr(new ARPInfoTests())); ts.add(auto_ptr(new MAC80211InfoTests())); ts.add(auto_ptr(new BatmobileOCUTests(argv[1]))); */ // Run the tests Test::TextOutput output(Test::TextOutput::Verbose); ts.run(output); closeTestLog(); /* auto_ptr output(cmdline(argc, argv)); ts.run(*output, true); Test::HtmlOutput* const html = dynamic_cast(output.get()); if (html) html->generate(cout, true, "MyTest"); */ } catch (...) { cout << "unexpected exception encountered\n"; return EXIT_FAILURE; } return EXIT_SUCCESS; } void openTestLog() { testLogH = new ofstream("test.log", ios_base::app); } void closeTestLog() { delete testLogH; } std::ostream &testLog() { return *testLogH; }