Serial run, CAPTURE back

This commit is contained in:
Martin Hořeňovský
2025-11-09 13:14:14 +01:00
parent 2e3214709a
commit a9116c2142
2 changed files with 3 additions and 2 deletions

View File

@@ -565,4 +565,5 @@ add_test(NAME ThreadSafetyTests
set_tests_properties(ThreadSafetyTests
PROPERTIES
PASS_REGULAR_EXPRESSION "assertions: 8001 | 4000 passed | 4001 failed"
RUN_SERIAL ON
)

View File

@@ -27,9 +27,9 @@ TEST_CASE( "Failed REQUIRE in the main thread is fine" ) {
std::vector<std::thread> threads;
for ( size_t t = 0; t < 4; ++t) {
threads.emplace_back( [t]() {
// CAPTURE(t);
CAPTURE(t);
for (size_t i = 0; i < 1'000; ++i) {
// CAPTURE(i);
CAPTURE(i);
CHECK( false );
CHECK( true );
}