2 EasyUnit : Simple C++ Unit testing framework
3 Copyright (C) 2004 Barthelemy Dagenais
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 barthelemy@prologique.com
33 virtual ~TestResult();
37 * Get the total number of successes registered by all
38 * test cases ran. This is the sum of all TestCase->getSuccessesCount().
40 *@return The number of successes registered by all testcases.
42 int getTotalSuccesses() const;
45 * Get the total number of errors registered by all
46 * test cases ran. This is the sum of all TestCase->getErrorsCount().
48 *@return The number of errors registered by all testcases.
50 int getTotalErrors() const;
53 * Get the total number of failures registered by all
54 * test cases ran. This is the sum of all TestCase->getFailuresCount().
56 * @return The number of failures registered by all testcases.
58 int getTotalFailures() const;
61 * Get the number of testcases ran that succeeded.
63 * @return The number of testcases ran that succeeded.
65 int getSuccesses() const;
68 * Get the number of testcases ran that failed.
70 * @return The number of testcases ran that failed.
72 int getFailures() const;
75 * Get the number of testcases ran that reported an error.
77 * @return The number of testcases ran that reported an error.
79 int getErrors() const;
82 * Get the number of testcases in the TestCase list.
84 * @return The size of the TestCase list
86 int getTestCaseCount() const;
89 * Get the number of tests
91 * @return The number of tests ran that succeeded
93 int getTestRanCount() const;
96 * Get the number of testcases ran.
98 * @return The number of testcases ran
100 int getTestCaseRanCount() const;
103 * Get the TestCase list. This list contains all TestCase registered and
104 * not only those that were ran.
106 * @return The TestCase list
108 TestCase
* getTestCases() const;
111 * Set the TestCase list and the size of the list.
113 * @param testCases TestCase list
114 * @param testCaseCount size of the TestCase list
116 void setTestCases(TestCase
*testCases
, int testCaseCount
);
119 * Add a TestCase result. This is used by a TestCase after it has
122 * @param testCase TestCase that ran and contains results to add to
125 virtual void addResult(TestCase
*testCase
);
128 int testCaseCount_
{0};
129 int testRanCount_
{0};
130 int testCaseRanCount_
{0};
132 int totalSuccesses_
{0};
134 int totalFailures_
{0};
140 TestCase
* testCases_
{0};
145 #endif // testresult_H