2 * LibSylph Class Library
3 * Copyright (C) 2009 Frank "SeySayux" Erens <seysayux@gmail.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the LibSylph Pulbic License as published
7 * by the LibSylph Developers; either version 1.0 of the License, or
8 * (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LibSylph
13 * Public License for more details.
15 * You should have received a copy of the LibSylph Public License
16 * along with this Library, if not, contact the LibSylph Developers.
18 * Created on 19 augustus 2009, 13:12
21 #include <cppunit/extensions/TestFactoryRegistry.h>
22 #include <cppunit/ui/text/TestRunner.h>
23 #include <cppunit/CompilerOutputter.h>
24 #include <cppunit/BriefTestProgressListener.h>
25 #include <cppunit/TestResultCollector.h>
26 #include <cppunit/TestResult.h>
31 int SylphMain(Array
<String
> args
) {
33 CppUnit::TextUi::TestRunner runner
;
34 CppUnit::BriefTestProgressListener progress
;
35 CppUnit::TestFactoryRegistry
®istry
=
36 CppUnit::TestFactoryRegistry::getRegistry();
37 runner
.addTest(registry
.makeTest());
38 runner
.setOutputter(new CppUnit::CompilerOutputter(&runner
.result(),
40 runner
.eventManager().addListener(&progress
);
41 int wasSuccessful
= runner
.run("", false);
42 return wasSuccessful
? 0 : 1;