CppTest home page CppTest project page

cpptest-output.h

Go to the documentation of this file.
00001 // ---
00002 //
00003 // $Id: cpptest-output.h,v 1.5 2005/06/08 09:25:09 nilu Exp $
00004 //
00005 // CppTest - A C++ Unit Testing Framework
00006 // Copyright (c) 2003 Niklas Lundell
00007 //
00008 // ---
00009 //
00010 // This library is free software; you can redistribute it and/or
00011 // modify it under the terms of the GNU Lesser General Public
00012 // License as published by the Free Software Foundation; either
00013 // version 2 of the License, or (at your option) any later version.
00014 //
00015 // This library is distributed in the hope that it will be useful,
00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the
00022 // Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00023 // Boston, MA 02111-1307, USA.
00024 //
00025 // ---
00026 
00029 #ifndef CPPTEST_OUTPUT_H
00030 #define CPPTEST_OUTPUT_H
00031 
00032 #include <string>
00033 
00034 namespace Test
00035 {
00036     class Source;
00037     class Time;
00038     
00049     class Output
00050     {
00051     public:
00054         virtual ~Output() {}
00055         
00060         virtual void initialize(int tests) {}
00061         
00067         virtual void finished(int tests, const Time& time) {}
00068 
00074         virtual void suite_start(int tests, const std::string& name) {}
00075         
00082         virtual void suite_end(int tests, const std::string& name,
00083                                const Time& time) {}
00084         
00089         virtual void test_start(const std::string& name) {}
00090         
00098         virtual void test_end(const std::string& name, bool ok,
00099                               const Time& time) {}
00100         
00105         virtual void assertment(const Source& s) {}
00106 
00107     protected:
00110         Output() {}
00111         
00112     private:
00113         Output(const Output&);
00114         Output& operator=(const Output&);
00115     };
00116     
00117 } // namespace Test
00118     
00119 #endif // #ifndef CPPTEST_OUTPUT_H
00120 
00121 

Supported by:

SourceForge Logo