From f17c1d59955c9b1c743ee56b0993738f4a5a9d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Mon, 4 May 2009 14:56:01 +0000 Subject: [PATCH] output cppunit to xml for bitten --- test/container_serialization_test.cxx | 6 +++++- test/serialization_test.cxx | 6 +++++- test/xml_test.cxx | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/test/container_serialization_test.cxx b/test/container_serialization_test.cxx index 32a7225..fc4b933 100644 --- a/test/container_serialization_test.cxx +++ b/test/container_serialization_test.cxx @@ -10,6 +10,8 @@ #include #include #include +#include +#include class A: public xml::Serialize { public: @@ -163,8 +165,10 @@ class ContainerSerializationTest: public CppUnit::TestFixture { }; CPPUNIT_TEST_SUITE_REGISTRATION(ContainerSerializationTest); -int main() try { +int main(int argc, char** argv) try { + std::ofstream ofs((*argv+std::string(".xml")).c_str()); CppUnit::TextUi::TestRunner runner; + runner.setOutputter(new CppUnit::XmlOutputter(&runner.result(), ofs)); runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); return runner.run() ? 0 : 1; } catch (std::exception& e) { diff --git a/test/serialization_test.cxx b/test/serialization_test.cxx index 52b2306..1e3f79e 100644 --- a/test/serialization_test.cxx +++ b/test/serialization_test.cxx @@ -10,6 +10,8 @@ #include #include #include +#include +#include class A: public xml::Serialize { public: @@ -344,8 +346,10 @@ class SerializationTest: public CppUnit::TestFixture { }; CPPUNIT_TEST_SUITE_REGISTRATION(SerializationTest); -int main() try { +int main(int argc, char** argv) try { + std::ofstream ofs((*argv+std::string(".xml")).c_str()); CppUnit::TextUi::TestRunner runner; + runner.setOutputter(new CppUnit::XmlOutputter(&runner.result(), ofs)); runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); return runner.run() ? 0 : 1; } catch (std::exception& e) { diff --git a/test/xml_test.cxx b/test/xml_test.cxx index 58342ed..c841812 100644 --- a/test/xml_test.cxx +++ b/test/xml_test.cxx @@ -10,6 +10,8 @@ #include #include #include +#include +#include #include class NodeTest: public CppUnit::TestFixture { @@ -443,8 +445,10 @@ class FunTest: public CppUnit::TestFixture { }; CPPUNIT_TEST_SUITE_REGISTRATION(FunTest); -int main() try { +int main(int argc, char** argv) try { + std::ofstream ofs((*argv+std::string(".xml")).c_str()); CppUnit::TextUi::TestRunner runner; + runner.setOutputter(new CppUnit::XmlOutputter(&runner.result(), ofs)); runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); return runner.run() ? 0 : 1; } catch (std::exception& e) {