/usr/include/cpptest-output.h is in libcpptest-dev 1.1.2-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | // ---
//
// $Id: cpptest-output.h,v 1.7 2008/07/15 21:20:26 hartwork Exp $
//
// CppTest - A C++ Unit Testing Framework
// Copyright (c) 2003 Niklas Lundell
//
// ---
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.
//
// ---
/** \file */
#ifndef CPPTEST_OUTPUT_H
#define CPPTEST_OUTPUT_H
#include <string>
#ifdef _MSC_VER
# define CPPTEST_UNUSED(x)
#else
# define CPPTEST_UNUSED(x) (void)x
#endif
namespace Test
{
class Source;
class Time;
/// \brief %Test suite output handler.
///
/// Abstract base class for all suite output handlers. Derive from this
/// class to create real output handlers that creates arbitrary complex
/// output handlers.
///
/// All parts of testing is reported (test start/stop, suite start/stop,
/// individual test start/stop, and assertments), thus giving maximum
/// flexibility for derived classes.
///
class Output
{
public:
/// Empty destructor.
///
virtual ~Output() {}
/// Called when testing is started.
///
/// \param tests Total number of tests in all suites.
///
virtual void initialize(int tests)
{
CPPTEST_UNUSED(tests);
}
/// Called when testing is finished.
///
/// \param tests Total number of tests in all suites.
/// \param time Total elapsed time for all tests.
///
virtual void finished(int tests, const Time& time)
{
CPPTEST_UNUSED(tests);
CPPTEST_UNUSED(time);
}
/// Called when a suite is entered.
///
/// \param tests Number of tests in this suite.
/// \param name Name of the suite.
///
virtual void suite_start(int tests, const std::string& name)
{
CPPTEST_UNUSED(tests);
CPPTEST_UNUSED(name);
}
/// Called when a suite is finished.
///
/// \param tests Number of tests in this suite.
/// \param name Name of the suite.
/// \param time Total elapsed time for all tests in this suite.
///
virtual void suite_end(int tests, const std::string& name,
const Time& time)
{
CPPTEST_UNUSED(tests);
CPPTEST_UNUSED(name);
CPPTEST_UNUSED(time);
}
/// Called when a tests is executed.
///
/// \param name Name of the test function.
///
virtual void test_start(const std::string& name)
{
CPPTEST_UNUSED(name);
}
/// Called when a test if finished, regardless if an assertment was
/// issued.
///
/// \param name Name of the test function.
/// \param ok True if the test was successful; false otherwise.
/// \param time Execution time.
///
virtual void test_end(const std::string& name, bool ok,
const Time& time)
{
CPPTEST_UNUSED(name);
CPPTEST_UNUSED(ok);
CPPTEST_UNUSED(time);
}
/// Called when an assertment is issued.
///
/// \param s Assert point information.
///
virtual void assertment(const Source& s)
{
CPPTEST_UNUSED(s);
}
protected:
/// Empty constructor.
///
Output() {}
private:
Output(const Output&);
Output& operator=(const Output&);
};
} // namespace Test
#endif // #ifndef CPPTEST_OUTPUT_H
|