8000 Correcting RequiredCheckArrayCloseDoesNotHaveSideEffectsWhenPassing t… · unittest-cpp/unittest-cpp@1c30bcd · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1c30bcd

Browse files
committed
Correcting RequiredCheckArrayCloseDoesNotHaveSideEffectsWhenPassing to exercise the passing case (per the UT name).
1 parent cd34fff commit 1c30bcd

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/TestRequireMacros.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -646,14 +646,9 @@ namespace {
646646
UnitTest::TestResults testResults;
647647
ScopedCurrentTest scopedResults(testResults);
648648

649-
const float data[] = { 0, 1, 2, 3 };
649+
const float data[] = { 1, 2, 3, 4 };
650650

651-
try
652-
{
653-
REQUIRE CHECK_ARRAY_CLOSE (data, FunctionWithSideEffects2(), 4, 0.01f);
654-
}
655-
catch (const UnitTest::RequiredCheckException&)
656-
{}
651+
REQUIRE CHECK_ARRAY_CLOSE (data, FunctionWithSideEffects2(), 4, 0.01f);
657652
}
658653
CHECK_EQUAL(1, g_sideEffect);
659654
}

0 commit comments

Comments
 (0)
0