TestListener.cpp
Go to the documentation of this file.
00001 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
00002 
00003 // -- BEGIN LICENSE BLOCK ----------------------------------------------
00004 // This file is part of FZIs ic_workspace.
00005 //
00006 // This program is free software licensed under the LGPL
00007 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
00008 // You can find a copy of this license in LICENSE folder in the top
00009 // directory of the source code.
00010 //
00011 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
00012 //
00013 // -- END LICENSE BLOCK ------------------------------------------------
00014 
00015 //----------------------------------------------------------------------
00022 //----------------------------------------------------------------------
00023 #include <iostream>
00024 #include <iomanip>
00025 
00026 #include "icl_core_testsuite/TestListener.h"
00027 
00028 namespace icl_core {
00029 
00030 void TestListener::startTest(CPPUNIT_NS::Test *test)
00031 {
00032   std::cerr << "  Running " << std::setw(60) << std::left << test->getName();
00033   m_success = true;
00034 }
00035 
00036 void TestListener::addFailure(const CPPUNIT_NS::TestFailure&)
00037 {
00038   m_success = false;
00039 }
00040 
00041 void TestListener::endTest(CPPUNIT_NS::Test*)
00042 {
00043   std::cerr << (m_success ? "OK" : "FAILED") << std::endl;
00044 }
00045 
00046 void TestListener::startSuite(CPPUNIT_NS::Test *test)
00047 {
00048   std::cerr << "Running test suite " << test->getName() << ":" << std::endl;
00049 }
00050 
00051 void TestListener::endSuite(CPPUNIT_NS::Test *test)
00052 {
00053   std::cerr << "Test suite " << test->getName() << " finished." << std::endl;
00054 }
00055 
00056 }


fzi_icl_core
Author(s):
autogenerated on Tue Aug 8 2017 02:28:04