Skip to content

Commit b2344fd

Browse files
committed
fix logic error in reset test case
1 parent 075a8d3 commit b2344fd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unique_resource.test.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ TEST_CASE("unique_resource does not clean up if reset before exception", "[uniqu
136136
[](DummyResource r) { *(r.cleanedUp) = true; }
137137
);
138138

139-
res.reset(); // disables cleanup
140-
139+
res.reset(); // disables cleanup, sets cleaned true
140+
141+
cleaned = false; //reset cleaned
142+
141143
throw std::runtime_error("Throwing after release");
142144

143145
} catch (...) {

0 commit comments

Comments
 (0)