summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'QA/UnitTest/checker.cpp')
-rw-r--r--QA/UnitTest/checker.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/QA/UnitTest/checker.cpp b/QA/UnitTest/checker.cpp
new file mode 100644
index 0000000..ea4f0d9
--- /dev/null
+++ b/QA/UnitTest/checker.cpp
@@ -0,0 +1,16 @@
+#include <string>
+#include <cppunit/ui/text/TestRunner.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/XmlOutputter.h>
+#include <cppunit/TextTestResult.h>
+
+int main(int argc, char* argv[])
+{
+ CppUnit::TestFactoryRegistry& registry = CppUnit::TestFactoryRegistry::getRegistry();
+ CppUnit::TextUi::TestRunner runner;
+ runner.addTest( registry.makeTest() );
+ if (argc >= 2 && std::string(argv[1]) != std::string("--xml")) {
+ runner.setOutputter(new CppUnit::XmlOutputter(&runner.result(), std::cout));
+ }
+ return (runner.run("") ? 0 : 1);
+}