source: git/tests/main.cpp @ 6ce030f

spielwiese
Last change on this file since 6ce030f was 6ce030f, checked in by Oleksandr Motsak <motsak@…>, 12 years ago
removal of the $Id$ svn tag from everywhere NOTE: the git SHA1 may be used instead (only on special places) NOTE: the libraries Singular/LIB/*.lib still contain the marker due to our current use of svn
  • Property mode set to 100644
File size: 2.0 KB
Line 
1/***********************************************************************/
2/** @file main.cpp
3 *
4 *
5 * <short description>
6 * <long description>
7 *
8 *  @author Kai Krueger
9 *  @date   2009-05-14
10 *  @email  kai.krueger@itwm.fhg.de
11 *
12 * (C) Fraunhofer ITWM Kaiserslautern
13 **/
14/*---------------------------------------------------------------------*/
15
16/*---------------------------------------------------------------------*
17 * System headers
18 *
19 *---------------------------------------------------------------------*/
20
21// cppunit includes
22#include <cppunit/extensions/TestFactoryRegistry.h>
23#include <cppunit/CompilerOutputter.h>
24#include <cppunit/XmlOutputter.h>
25#include <cppunit/TestResult.h>
26#include <cppunit/TestResultCollector.h>
27#include <cppunit/TextTestRunner.h>
28#include <cppunit/ui/text/TestRunner.h>
29#include <cppunit/TextTestProgressListener.h>
30#include <cppunit/BriefTestProgressListener.h>
31#include <cppunit/TestFailure.h>
32#include <cppunit/Test.h>
33
34#include <cppunit/XmlOutputterHook.h>
35#include <cppunit/tools/XmlElement.h>
36#include <cppunit/tools/StringTools.h>
37#include <cppunit/tools/XmlDocument.h>
38#include <cppunit/TestFailure.h>
39#include <cppunit/SourceLine.h>
40#include <cppunit/Exception.h>
41#include <cppunit/Message.h>
42
43#include <tests/Suite.hpp>
44
45int main(int /* argc */, char ** /*argv*/)
46{
47  // Informiert Test-Listener ueber Testresultate
48  CPPUNIT_NS::TestResult                   testresult;
49  CPPUNIT_NS::TestResultCollector collectedresults;
50  testresult.addListener (&collectedresults);
51
52  // Test-Suite ueber die Registry im Test-Runner einfuegen
53  CPPUNIT_NS :: TestRunner runner;
54  runner.addTest ( Singular::tests::Suite::suite() );
55
56  std::cout << "running testsuite" << std::endl;
57
58  runner.run (testresult);
59
60  std::cout << "running testsuite  done" << std::endl;
61  // print and save results
62  std::ofstream outStream("out.xml");
63  CPPUNIT_NS::XmlOutputter xmloutputter (&collectedresults, outStream);
64  xmloutputter.write ();
65
66  return collectedresults.wasSuccessful () ? 0 : 1;
67}
Note: See TracBrowser for help on using the repository browser.