1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
#include <iostream>
#include <string>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>
#include <locale.h>
#include <wx/init.h>
int main(int, char*[])
{
setlocale(LC_ALL, "");
if (!wxInitialize())
{
std::cout << "Failed to initialize wxWidgets" << std::endl;
return 1;
}
CppUnit::TextUi::TestRunner runner;
CppUnit::TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry();
runner.addTest(registry.makeTest());
bool wasSuccessful = runner.run("", false);
wxUninitialize();
return wasSuccessful ? 0 : 1;
}
|