From 89843cca3702c84d08cdfb27ce2d33a6905b7243 Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc <6860842+ambroise-leclerc@users.noreply.github.com> Date: Mon, 9 Nov 2026 15:15:19 +0100 Subject: [PATCH 1/2] Adjust failure assertions in host and React store tests --- test/unit/HostTests.cpp | 2 +- test/unit/ReactStoreTests.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/unit/HostTests.cpp b/test/unit/HostTests.cpp index 9d21efaa..15d6c5f0 100644 --- a/test/unit/HostTests.cpp +++ b/test/unit/HostTests.cpp @@ -69,7 +69,7 @@ std::string waitFor(HostSession& host, double id) { return *summary; std::this_thread::sleep_for(10ms); } - FAIL("the run did not end"); + FAIL_CHECK("the run did not end"); return {}; } diff --git a/test/unit/ReactStoreTests.cpp b/test/unit/ReactStoreTests.cpp index 53b1ea45..bcd6dd51 100644 --- a/test/unit/ReactStoreTests.cpp +++ b/test/unit/ReactStoreTests.cpp @@ -127,7 +127,14 @@ SCENARIO("React stores coalesce a thousand writes into one snapshot per server c unsigned errors{}; store.onError([&](std::exception_ptr error) { ++errors; - REQUIRE_THROWS(std::rethrow_exception(error)); + bool rethrown = false; + try { + std::rethrow_exception(error); + } + catch (...) { + rethrown = true; + } + REQUIRE(rethrown); }); harness.fail = true; store.set(1000); From c7da03a519cff96ccd712ed6e940c7b80cdb1ccd Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc <6860842+ambroise-leclerc@users.noreply.github.com> Date: Mon, 9 Nov 2026 15:26:54 +0100 Subject: [PATCH 2/2] Simplify the React store exception assertion --- test/unit/ReactStoreTests.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/test/unit/ReactStoreTests.cpp b/test/unit/ReactStoreTests.cpp index bcd6dd51..0beb6b05 100644 --- a/test/unit/ReactStoreTests.cpp +++ b/test/unit/ReactStoreTests.cpp @@ -127,14 +127,7 @@ SCENARIO("React stores coalesce a thousand writes into one snapshot per server c unsigned errors{}; store.onError([&](std::exception_ptr error) { ++errors; - bool rethrown = false; - try { - std::rethrow_exception(error); - } - catch (...) { - rethrown = true; - } - REQUIRE(rethrown); + REQUIRE(error != nullptr); }); harness.fail = true; store.set(1000);