main.cpp
Go to the documentation of this file.
1 
11 #include <cppunit/BriefTestProgressListener.h>
12 #include <cppunit/CompilerOutputter.h>
13 #include <cppunit/extensions/TestFactoryRegistry.h>
14 #include <cppunit/TestResult.h>
15 #include <cppunit/TestResultCollector.h>
16 #include <cppunit/TestRunner.h>
17 #include <exception>
18 #include <iostream>
19 
20 int main(int argc, char ** argv)
21 {
22  try
23  {
24  CPPUNIT_NS::TestResult controller;
25  CPPUNIT_NS::TestResultCollector result;
26  controller.addListener(&result);
27  CPPUNIT_NS::BriefTestProgressListener progress;
28  controller.addListener(&progress);
29  CPPUNIT_NS::TestRunner runner;
30  runner.addTest(CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest());
31  runner.run(controller);
32  CPPUNIT_NS::CompilerOutputter outputter(&result, CPPUNIT_NS::stdCOut());
33  outputter.write();
34  return result.wasSuccessful() ? 0 : -1;
35  }
36 
37  catch (const std::exception & exc)
38  {
39  std::cout << exc.what() << std::endl;
40  }
41 
42  catch (...)
43  {
44  std::cout << "Unknown exception." << std::endl;
45  }
46 
47  return -1;
48 }
int main(int argc, char **argv)
Test main function GNU LGPL.
Definition: main.cpp:20


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:12:06