8000 Eliminate some single-line if statements. · Reification/unittest-cpp@3f5095b · GitHub
[go: up one dir, main page]

Skip to content

Commit 3f5095b

Browse files
committed
Eliminate some single-line if statements.
1 parent 5eec0a2 commit 3f5095b

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

UnitTest++/ThrowingTestReporter.cpp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,38 @@ namespace UnitTest {
1414
//virtual
1515
void ThrowingTestReporter::ReportTestStart(TestDetails const& test)
1616
{
17-
if(m_decoratedReporter) m_decoratedReporter->ReportTestStart(test);
17+
if(m_decoratedReporter)
18+
{
19+
m_decoratedReporter->ReportTestStart(test);
20+
}
1821
}
1922

2023
//virtual
2124
void ThrowingTestReporter::ReportFailure(TestDetails const& test, char const* failure)
2225
{
23-
if(m_decoratedReporter) m_decoratedReporter->ReportFailure(test, failure);
26+
if(m_decoratedReporter)
27+
{
28+
m_decoratedReporter->ReportFailure(test, failure);
29+
}
2430
throw RequiredCheckException();
2531
}
2632

2733
//virtual
2834
void ThrowingTestReporter::ReportTestFinish(TestDetails const& test, float secondsElapsed)
2935
{
30-
if(m_decoratedReporter) m_decoratedReporter->ReportTestFinish(test, secondsElapsed);
36+
if(m_decoratedReporter)
37+
{
38+
m_decoratedReporter->ReportTestFinish(test, secondsElapsed);
39+
}
3140
}
3241

3342
//virtual
3443
void ThrowingTestReporter::ReportSummary(int totalTestCount, int failedTestCount, int failureCount, float secondsElapsed)
3544
{
36-
if(m_decoratedReporter) m_decoratedReporter->ReportSummary(totalTestCount, failedTestCount, failureCount, secondsElapsed);
45+
if(m_decoratedReporter)
46+
{
47+
m_decoratedReporter->ReportSummary(totalTestCount, failedTestCount, failureCount, secondsElapsed);
48+
}
3749
}
3850

3951
}

0 commit comments

Comments
 (0)
0