X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/50753d5f8442a47c17c4035724201a18a7ff6146..6260d187764dc644d699e1a53454f7efdcc682df:/src/mc/explo/udpor/Unfolding_test.cpp diff --git a/src/mc/explo/udpor/Unfolding_test.cpp b/src/mc/explo/udpor/Unfolding_test.cpp index d75fb28763..30e1529267 100644 --- a/src/mc/explo/udpor/Unfolding_test.cpp +++ b/src/mc/explo/udpor/Unfolding_test.cpp @@ -17,11 +17,13 @@ TEST_CASE("simgrid::mc::udpor::Unfolding: Creating an unfolding") REQUIRE(unfolding.empty()); } -TEST_CASE("simgrid::mc::udpor::Unfolding: Inserting and removing events with an unfolding") +TEST_CASE("simgrid::mc::udpor::Unfolding: Inserting and marking events with an unfolding") { Unfolding unfolding; - auto e1 = std::make_unique(); - auto e2 = std::make_unique(); + auto e1 = std::make_unique( + EventSet(), std::make_shared(Transition::Type::UNKNOWN, 0)); + auto e2 = + std::make_unique(EventSet(), std::make_shared(Transition::Type::UNKNOWN, 1)); const auto e1_handle = e1.get(); const auto e2_handle = e2.get(); @@ -33,32 +35,13 @@ TEST_CASE("simgrid::mc::udpor::Unfolding: Inserting and removing events with an REQUIRE(unfolding.size() == 2); REQUIRE_FALSE(unfolding.empty()); - unfolding.remove(e1_handle); - REQUIRE(unfolding.size() == 1); + unfolding.mark_finished(e1_handle); + REQUIRE(unfolding.size() == 2); REQUIRE_FALSE(unfolding.empty()); - unfolding.remove(e2_handle); - REQUIRE(unfolding.size() == 0); - REQUIRE(unfolding.empty()); -} - -TEST_CASE("simgrid::mc::udpor::Unfolding: Checking for semantically equivalent events") -{ - Unfolding unfolding; - auto e1 = std::make_unique( - EventSet(), std::make_shared(Transition::Type::BARRIER_ASYNC_LOCK, 6, 2)); - auto e2 = std::make_unique( - EventSet(), std::make_shared(Transition::Type::BARRIER_ASYNC_LOCK, 6, 2)); - - // e1 and e2 are equivalent - REQUIRE(*e1 == *e2); - - const auto e1_handle = e1.get(); - const auto e2_handle = e2.get(); - unfolding.insert(std::move(e1)); - - REQUIRE(unfolding.contains_event_equivalent_to(e1_handle)); - REQUIRE(unfolding.contains_event_equivalent_to(e2_handle)); + unfolding.mark_finished(e2_handle); + REQUIRE(unfolding.size() == 2); + REQUIRE_FALSE(unfolding.empty()); } TEST_CASE("simgrid::mc::udpor::Unfolding: Checking all immediate conflicts restricted to an unfolding") {} \ No newline at end of file