Debian Codegraph @

c++/SubunitTestProgressListener.h

raw
1 /* Subunit test listener for cppunit (http://cppunit.sourceforge.net).
2 * Copyright (C) 2006 Robert Collins <[email protected]>
3 *
4 * Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
5 * license at the users choice. A copy of both licenses are available in the
6 * project source as Apache-2.0 and BSD. You may not use this file except in
7 * compliance with one of these two licences.
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under these licenses is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the license you chose for the specific language governing permissions
13 * and limitations under that license.
14 */
15 #ifndef CPPUNIT_SUBUNITTESTPROGRESSLISTENER_H
16 #define CPPUNIT_SUBUNITTESTPROGRESSLISTENER_H
17
18 #include <cppunit/TestListener.h>
19
20
21 CPPUNIT_NS_BEGIN
22
23
24 /*!
25 * \brief TestListener that outputs subunit
26 * (http://www.robertcollins.net/unittest/subunit) compatible output.
27 * \ingroup TrackingTestExecution
28 */
29 class CPPUNIT_API SubunitTestProgressListener : public TestListener
30 {
31 public:
32
33 SubunitTestProgressListener() {}
34
35 void startTest( Test *test );
36
37 void addFailure( const TestFailure &failure );
38
39 void endTest( Test *test );
40
41 private:
42 /// Prevents the use of the copy constructor.
43 SubunitTestProgressListener( const SubunitTestProgressListener &copy );
44
45 /// Prevents the use of the copy operator.
46 void operator =( const SubunitTestProgressListener &copy );
47
48 private:
49 int last_test_failed;
50 };
51
52
53 CPPUNIT_NS_END
54
55 #endif // CPPUNIT_SUBUNITTESTPROGRESSLISTENER_H
56