middle of porting; unstable, don't checkout; refs #1
This commit is contained in:
34
test/mrw-c++_test.cxx
Normal file
34
test/mrw-c++_test.cxx
Normal file
@@ -0,0 +1,34 @@
|
||||
/*! @file
|
||||
|
||||
@id $Id: xml_test.cxx 37 2009-05-04 14:56:01Z admin $
|
||||
*/
|
||||
// 1 2 3 4 5 6 7 8
|
||||
// 45678901234567890123456789012345678901234567890123456789012345678901234567890
|
||||
|
||||
#include <cppunit/TestFixture.h>
|
||||
#include <cppunit/ui/text/TestRunner.h>
|
||||
#include <cppunit/extensions/HelperMacros.h>
|
||||
#include <cppunit/extensions/TestFactoryRegistry.h>
|
||||
#include <cppunit/XmlOutputter.h>
|
||||
#include <fstream>
|
||||
|
||||
class MrwC++Test: public CppUnit::TestFixture {
|
||||
public:
|
||||
void test() {
|
||||
}
|
||||
CPPUNIT_TEST_SUITE(MrwC++Test);
|
||||
CPPUNIT_TEST(test);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
};
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(MrwC++Test);
|
||||
|
||||
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) {
|
||||
std::cerr<<"***Exception: "<<e.what()<<std::endl;
|
||||
return 1;
|
||||
}
|
Reference in New Issue
Block a user