From 8f980bafd078433bccc0f0117221753fdd8107c0 Mon Sep 17 00:00:00 2001 From: Maxwell Pirtle Date: Fri, 17 Mar 2023 14:03:35 +0100 Subject: [PATCH] Fix test in k-partial alternatives step five The fifth step in the K-partial alternatives actually has three possible alternatives that can be selected instead of only one. UDPOR would still pick e7 next regardless, but more than one outcome is possible. --- src/mc/explo/udpor/Configuration_test.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mc/explo/udpor/Configuration_test.cpp b/src/mc/explo/udpor/Configuration_test.cpp index cff61e7834..8deb62e814 100644 --- a/src/mc/explo/udpor/Configuration_test.cpp +++ b/src/mc/explo/udpor/Configuration_test.cpp @@ -834,8 +834,8 @@ TEST_CASE("simgrid::mc::udpor:Configuration: Computing Full Alternatives in Read // // Alt(C, D + {e}) --> Alt({e0, e4}, {e1, e5}) // - // where U is given above. There is one alternative in this case, - // viz. {e0, e4, e7, e8}. + // where U is given above. There are THREE alternatives in this case, + // viz. {e0, e7}, {e0, e4, e7} and {e0, e4, e7, e8}. // // To continue the search, UDPOR computes J / C which in this // case gives {e7, e8}. Since `e8` is not in en(C), UDPOR will @@ -852,10 +852,13 @@ TEST_CASE("simgrid::mc::udpor:Configuration: Computing Full Alternatives in Read U.insert(std::move(e6)); U.insert(std::move(e7)); U.insert(std::move(e8)); + REQUIRE(U.size() == 8); const auto alternative = C.compute_alternative_to(D_plus_e, U); REQUIRE(alternative.has_value()); - REQUIRE(alternative.value().get_events() == EventSet({e0_handle, e4_handle, e7_handle, e8_handle})); + REQUIRE((alternative.value().get_events() == EventSet({e0_handle, e7_handle}) or + alternative.value().get_events() == EventSet({e0_handle, e4_handle, e7_handle}) or + alternative.value().get_events() == EventSet({e0_handle, e4_handle, e7_handle, e8_handle}))); } SECTION("Alternative computation call 6") -- 2.20.1