Skip to content

Commit 1fe3d72

Browse files
committed
Reformatted code from #54.
1 parent 7459844 commit 1fe3d72

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

tests/TestTestRunner.cpp

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@ namespace
2424
virtual void RunImpl() const
2525
{
2626
TestResults& testResults_ = *CurrentTest::Results();
27+
2728
for (int i=0; i < count; ++i)
2829
{
2930
if (asserted)
31+
{
3032
ReportAssert("desc", "file", 0);
33+
}
3134
else if (!success)
35+
{
3236
testResults_.OnTestFailure(m_details, "message");
37+
}
3338
}
3439
}
3540

@@ -38,8 +43,13 @@ namespace
3843
int const count;
3944
};
4045

41-
struct FixtureBase {
42-
explicit FixtureBase() : runner(reporter) { }
46+
struct FixtureBase
47+
{
48+
FixtureBase()
49+
: runner(reporter)
50+
{
51+
}
52+
4353
template <class Predicate>
4454
int RunTestsIf(TestList const& list, char const* suiteName,
4555
const Predicate& predicate, int maxTestTimeInMs)
@@ -51,6 +61,7 @@ namespace
5161
CurrentTest::Details() = oldDetails;
5262
return result;
5363
}
64+
5465
TestRunner runner;
5566
RecordingReporter reporter;
5667
};
@@ -83,7 +94,11 @@ namespace
8394
class SlowTest : public Test
8495
{
8596
public:
86-
SlowTest() : Test("slow", "somesuite", "filename", 123) {}
97+
SlowTest()
98+
: Test("slow", "somesuite", "filename", 123)
99+
{
100+
}
101+
87102
virtual void RunImpl() const
88103
{
89104
TimeHelpers::SleepMs(20);
@@ -277,7 +292,7 @@ namespace
277292
Test fail("fail");
278293

279294
CHECK(predicate(&pass));
280-
CHECK(!predicate(&fail));
295+
CHECK(!predicate(&fail));
281296
}
282297

283298
TEST_FIXTURE(TestRunnerFixture, TestRunnerRunsTestsThatPassPredicate)

0 commit comments

Comments
 (0)