Skip to content

Commit f54e36b

Browse files
committed
Fixed incorrect message for failed checks saying failed tests. Changed functions and message to represent failed checks for issue #30.
1 parent 78825fe commit f54e36b

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

test/TestClass.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ class TestClass
572572
// Shared data helper functions
573573
static bool HasSharedFailure() throw()
574574
{
575-
return (GetSharedData().GetTotalFailedTests() > 0) ||
575+
return (GetSharedData().GetTotalFailedChecks() > 0) ||
576576
(GetSharedData().GetTotalLeakedTests() > 0);
577577
}
578578

@@ -944,7 +944,7 @@ class TestClass
944944
if (GetSharedData().GetTotalNotTested() > 0)
945945
privateLogCount("Total not tested", GetSharedData().GetTotalNotTested());
946946
if (HasSharedFailure())
947-
privateLogCount("Total failed tests", GetSharedData().GetTotalFailedTests());
947+
privateLogCount("Total failed checks", GetSharedData().GetTotalFailedChecks());
948948
privateLogCount("Total functions tested", GetSharedData().GetTotalFunctionsTested());
949949
if (GetSharedData().GetTotalTimedFunctions() > 0)
950950
privateLogCount("Total functions timed", GetSharedData().GetTotalTimedFunctions());
@@ -985,7 +985,7 @@ class TestClass
985985
{
986986
if (line_number > 0)
987987
{
988-
GetSharedData().IncTotalFailedTests();
988+
GetSharedData().IncTotalFailedChecks();
989989
m_check_failures.Append("LINE: ");
990990
m_check_failures.Append(static_cast<unsigned long>(line_number));
991991
m_check_failures.Append("\n");

test/TestClassSharedData.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class TestClassSharedData
3838
, m_logged_line(0)
3939
, m_total_checks(0)
4040
, m_total_not_tested(0)
41-
, m_total_failed_tests(0)
41+
, m_total_failed_checks(0)
4242
, m_total_leaked_tests(0)
4343
, m_total_functions_tested(0)
4444
, m_total_timed_functions(0)
@@ -155,19 +155,19 @@ class TestClassSharedData
155155
++m_total_not_tested;
156156
}
157157

158-
SizeType GetTotalFailedTests() const throw()
158+
SizeType GetTotalFailedChecks() const throw()
159159
{
160-
return m_total_failed_tests;
160+
return m_total_failed_checks;
161161
}
162162

163-
void SetTotalFailedTests(SizeType total_failed_tests) throw()
163+
void SetTotalFailedTests(SizeType total_failed_checks) throw()
164164
{
165-
m_total_failed_tests = total_failed_tests;
165+
m_total_failed_checks = total_failed_checks;
166166
}
167167

168-
void IncTotalFailedTests()
168+
void IncTotalFailedChecks()
169169
{
170-
++m_total_failed_tests;
170+
++m_total_failed_checks;
171171
}
172172

173173
SizeType GetTotalLeakedTests() const throw()
@@ -286,7 +286,7 @@ class TestClassSharedData
286286
// Counts for all tests.
287287
SizeType m_total_checks;
288288
SizeType m_total_not_tested;
289-
SizeType m_total_failed_tests;
289+
SizeType m_total_failed_checks;
290290
SizeType m_total_leaked_tests;
291291
SizeType m_total_functions_tested;
292292
SizeType m_total_timed_functions;

0 commit comments

Comments
 (0)