TestListener.cpp
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // This file is part of FZIs ic_workspace.
5 //
6 // This program is free software licensed under the LGPL
7 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8 // You can find a copy of this license in LICENSE folder in the top
9 // directory of the source code.
10 //
11 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
12 //
13 // -- END LICENSE BLOCK ------------------------------------------------
14 
15 //----------------------------------------------------------------------
22 //----------------------------------------------------------------------
23 #include <iostream>
24 #include <iomanip>
25 
27 
28 namespace icl_core {
29 
30 void TestListener::startTest(CPPUNIT_NS::Test *test)
31 {
32  std::cerr << " Running " << std::setw(60) << std::left << test->getName();
33  m_success = true;
34 }
35 
36 void TestListener::addFailure(const CPPUNIT_NS::TestFailure&)
37 {
38  m_success = false;
39 }
40 
41 void TestListener::endTest(CPPUNIT_NS::Test*)
42 {
43  std::cerr << (m_success ? "OK" : "FAILED") << std::endl;
44 }
45 
46 void TestListener::startSuite(CPPUNIT_NS::Test *test)
47 {
48  std::cerr << "Running test suite " << test->getName() << ":" << std::endl;
49 }
50 
51 void TestListener::endSuite(CPPUNIT_NS::Test *test)
52 {
53  std::cerr << "Test suite " << test->getName() << " finished." << std::endl;
54 }
55 
56 }
virtual void startTest(CPPUNIT_NS::Test *test)
ThreadStream & endl(ThreadStream &stream)
Definition: ThreadStream.h:249
Contains icl_core::TestListener.
virtual void startSuite(CPPUNIT_NS::Test *test)
virtual void endTest(CPPUNIT_NS::Test *test)
virtual void endSuite(CPPUNIT_NS::Test *test)
virtual void addFailure(const CPPUNIT_NS::TestFailure &failure)


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:58