CppTest home page CppTest project page

cpptest-source.h
Go to the documentation of this file.
1// ---
2//
3// $Id: cpptest-source.h,v 1.3 2005/06/08 08:08:06 nilu Exp $
4//
5// CppTest - A C++ Unit Testing Framework
6// Copyright (c) 2003 Niklas Lundell
7//
8// ---
9//
10// This library is free software; you can redistribute it and/or
11// modify it under the terms of the GNU Lesser General Public
12// License as published by the Free Software Foundation; either
13// version 2 of the License, or (at your option) any later version.
14//
15// This library is distributed in the hope that it will be useful,
16// but WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18// Lesser General Public License for more details.
19//
20// You should have received a copy of the GNU Lesser General Public
21// License along with this library; if not, write to the
22// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23// Boston, MA 02111-1307, USA.
24//
25// ---
26
28
29#ifndef CPPTEST_SOURCE_H
30#define CPPTEST_SOURCE_H
31
32#include <string>
33
34namespace Test
35{
36 class Suite;
37
42 class Source
43 {
44 friend class Suite;
45
46 public:
47 Source();
48 Source(const char* file, unsigned int line, const char* msg);
49
50 const std::string& file() const;
51 unsigned int line() const;
52 const std::string& message() const;
53 const std::string& suite() const;
54 const std::string& test() const;
55
56 private:
57 unsigned int _line;
58 std::string _file;
59 std::string _msg;
60 std::string _suite;
61 std::string _test;
62 };
63
64} // namespace Test
65
66#endif // #ifndef CPPTEST_SOURCE_H
67
const std::string & suite() const
Definition source.cpp:79
Source()
Definition source.cpp:36
const std::string & file() const
Definition source.cpp:55
unsigned int line() const
Definition source.cpp:63
const std::string & test() const
Definition source.cpp:87
const std::string & message() const
Definition source.cpp:71
Unit testing suite.
Definition cpptest-suite.h:53
Definition collectoroutput.cpp:38

Supported by:

SourceForge Logo