30 #include <terralib/plugin.h> 33 #include <cppunit/BriefTestProgressListener.h> 34 #include <cppunit/CompilerOutputter.h> 35 #include <cppunit/extensions/HelperMacros.h> 36 #include <cppunit/extensions/TestFactoryRegistry.h> 37 #include <cppunit/TestResult.h> 38 #include <cppunit/TestResultCollector.h> 39 #include <cppunit/TestRunner.h> 40 #include <cppunit/XmlOutputter.h> 76 CPPUNIT_NS::TestResult controller;
79 CPPUNIT_NS::TestResultCollector result;
81 controller.addListener(&result);
84 CPPUNIT_NS::BriefTestProgressListener progress;
86 controller.addListener(&progress);
89 CppUnit::Test* suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
91 CPPUNIT_NS::TestRunner runner;
93 runner.addTest(suite);
95 runner.run(controller);
97 CPPUNIT_NS::CompilerOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
106 CPPUNIT_NS::OFileStream file2( TE_OUTPUT_REPORT_DIR
"/testsResult_qtwidgets_xml.xml" );
107 CPPUNIT_NS::XmlOutputter xml( &result, file2 );
108 xml.setStyleSheet(
"report.xsl" );
115 bool resultStatus = result.wasSuccessful();
117 return resultStatus ? EXIT_SUCCESS : EXIT_FAILURE;
119 catch(
const std::exception& e)
121 std::cout << std::endl <<
"An exception has occuried: " << e.what() << std::endl;
123 std::cout <<
"Press Enter to exit..." << std::endl;
130 std::cout << std::endl <<
"An unexpected exception has occuried!" << std::endl;
132 std::cout <<
"Press Enter to exit..." << std::endl;
An utility class to control the startup and cleanup of the TerraLib Platform and its resources...
void LoadModules()
It loads the data source drivers.
void finalize()
It finalizes the TerraLib Platform.
static PluginManager & getInstance()
It returns a reference to the singleton instance.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
void initialize()
It initializes the TerraLib Platform.
This file contains include headers for the TerraLib PostGIS driver.
This file contains include headers for the Color Model of TerraLib.
This file contains include headers for the TerraLib Common Runtime module.
The basic information about a plugin.
This file contains include headers for the Vector Geometry model of TerraLib.
This file contains include headers for the Data Access module of TerraLib.
TEPLUGINEXPORT PluginInfo * GetInstalledPlugin(const std::string &pluginFilePath)
It returns information about a given plugin provided its plugin configuration file name or dir...