Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / src / mc / explo / udpor / History_test.cpp
index a1fbd1aa341508bf5ba31a0fcd352a0d92820e7d..55065a3e915e486ceab7798a64fef02c9b8cb90f 100644 (file)
@@ -18,9 +18,12 @@ TEST_CASE("simgrid::mc::udpor::History: History generation")
   //  | \  \  /   /
   // e3 e4 e5      e7
   UnfoldingEvent e1;
-  UnfoldingEvent e2{&e1}, e6{&e1};
-  UnfoldingEvent e3{&e2}, e4{&e2};
-  UnfoldingEvent e5{&e2, &e6}, e7{&e6};
+  UnfoldingEvent e2{&e1};
+  UnfoldingEvent e6{&e1};
+  UnfoldingEvent e3{&e2};
+  UnfoldingEvent e4{&e2};
+  UnfoldingEvent e5{&e2, &e6};
+  UnfoldingEvent e7{&e6};
 
   SECTION("History with no events")
   {
@@ -170,7 +173,7 @@ TEST_CASE("simgrid::mc::udpor::History: History generation")
       REQUIRE_FALSE(history_e3e5.contains(&e7));
     }
 
-    SECTION("Nodes with the different ancestors")
+    SECTION("Nodes with different ancestors")
     {
       History history_e4e7(EventSet({&e4, &e7}));
       REQUIRE(history_e4e7.get_all_events() == EventSet({&e1, &e2, &e4, &e6, &e7}));
@@ -196,17 +199,17 @@ TEST_CASE("simgrid::mc::udpor::History: History generation")
       REQUIRE_FALSE(history_e2356.contains(&e7));
     }
 
-    SECTION("History of the entire graph is the entire graph")
+    SECTION("History of the entire graph yields the entire graph")
     {
-      History history_e2356(EventSet({&e1, &e2, &e3, &e4, &e5, &e6, &e7}));
-      REQUIRE(history_e2356.get_all_events() == EventSet({&e1, &e2, &e3, &e4, &e5, &e6, &e7}));
-      REQUIRE(history_e2356.contains(&e1));
-      REQUIRE(history_e2356.contains(&e2));
-      REQUIRE(history_e2356.contains(&e3));
-      REQUIRE(history_e2356.contains(&e4));
-      REQUIRE(history_e2356.contains(&e5));
-      REQUIRE(history_e2356.contains(&e6));
-      REQUIRE(history_e2356.contains(&e7));
+      History history(EventSet({&e1, &e2, &e3, &e4, &e5, &e6, &e7}));
+      REQUIRE(history.get_all_events() == EventSet({&e1, &e2, &e3, &e4, &e5, &e6, &e7}));
+      REQUIRE(history.contains(&e1));
+      REQUIRE(history.contains(&e2));
+      REQUIRE(history.contains(&e3));
+      REQUIRE(history.contains(&e4));
+      REQUIRE(history.contains(&e5));
+      REQUIRE(history.contains(&e6));
+      REQUIRE(history.contains(&e7));
     }
   }
 }