Skip to content

Commit

Permalink
Fix scan test
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Dec 29, 2023
1 parent d5823aa commit 662d784
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions test/scan-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ TEST(scan_test, file) {
}

TEST(scan_test, lock) {

fmt::file read_end, write_end;
fmt::file::pipe(read_end, write_end);

Expand All @@ -153,7 +152,6 @@ TEST(scan_test, lock) {
write_end.close();
});

std::atomic<int> count = 0;
fmt::buffered_file f = read_end.fdopen("r");
auto fun = [&]() {
int value = 0;
Expand All @@ -163,15 +161,12 @@ TEST(scan_test, lock) {
EXPECT_EQ(value, 42);
break;
}
++count;
}
};
std::thread consumer1(fun);
std::thread consumer2(fun);
producer.join();
consumer1.join();
consumer2.join();
EXPECT_EQ(count, 1000);

}
#endif // FMT_USE_FCNTL

0 comments on commit 662d784

Please sign in to comment.