Skip to content

Commit c190eda

Browse files
committed
fix constness and capture issues in test
1 parent 8370ec4 commit c190eda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/unique_resource.test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ TEST_CASE("Construct file unique_resource", "[unique_resource]") {
1616
{
1717
auto file = beman::scope::unique_resource(
1818
fopen("example.txt", "w"), // Acquire the FILE*
19-
[close_file_good](FILE* f) { if (f) {
19+
[close_file_good&](FILE* f) { if (f) {
2020
fclose(f); // Release (cleanup) the resource
2121
close_file_good = true;
2222
}
@@ -38,7 +38,7 @@ struct DummyResource {
3838
*cleanedUp = false;
3939
}
4040

41-
void do_something() {}
41+
void do_something() const {}
4242
};
4343

4444
TEST_CASE("unique_resource calls cleanup on destruction", "[unique_resource]") {

0 commit comments

Comments
 (0)