Skip to content

Commit 5a47891

Browse files
committed
Ensure action is not called early
1 parent c3ad24d commit 5a47891

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internals/testing/finally_test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ auto finally_lambda_test = test([]() {
1010

1111
{
1212
auto finalizer = dumpster_v1::finally([&]() { finalized = true; });
13-
executed = true;
13+
executed = !finalized;
1414
}
1515

1616
verify(finalized);
@@ -25,7 +25,7 @@ auto finally_function_test = test([]() {
2525

2626
{
2727
auto finalizer = dumpster_v1::finally(s_function);
28-
executed = true;
28+
executed = !s_finalized;
2929
}
3030

3131
verify(s_finalized);

0 commit comments

Comments
 (0)