ATLAS Offline Software
Loading...
Searching...
No Matches
AtlasTest
TestTools
TestTools
CppUnit_testdriver.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include <cppunit/extensions/TestFactoryRegistry.h>
6
#include <cppunit/TextTestRunner.h>
7
#include <cppunit/CompilerOutputter.h>
8
#include <cppunit/TextOutputter.h>
9
#include <cppunit/XmlOutputter.h>
10
#include <iostream>
11
19
20
21
int
main
(
int
/*argc*/
,
char
**
/* argv */
)
22
{
24
CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
25
27
CppUnit::TextTestRunner runner;
28
runner.addTest( suite );
29
30
// Change the default outputter to a compiler error format outputter
31
// uncomment the following line if you need a compiler outputter.
32
//runner.setOutputter(new CppUnit::CompilerOutputter( &runner.result(),
33
// std::cerr ) );
34
35
// Change the default outputter to a xml error format outputter
36
// uncomment the following line if you need a xml outputter.
37
//runner.setOutputter( new CppUnit::XmlOutputter( &runner.result(),
38
// std::cerr ) );
39
41
// bool wasSuccessful = runner.run_spi();
42
// If you want to avoid the CppUnit typical output change the line above
43
// by the following one:
44
bool
wasSuccessful = runner.run(
""
,
false
,
true
,
false
);
45
46
// Return error code 1 if the one of test failed.
47
if
(!wasSuccessful)
return
1;
48
49
// Uncomment the next line if you want to integrate CppUnit with Oval
50
// std::cout <<"[OVAL] Cppunit-result ="<<!wasSuccessful<<"\n" ;
51
return
0;
52
}
main
int main()
Definition
hello.cxx:18
Generated on
for ATLAS Offline Software by
1.14.0