Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add tests before changes to WakeupTree structure
[simgrid.git] / src / mc / explo / odpor / Execution_test.cpp
index 143c0a7..0ed54f9 100644 (file)
@@ -277,4 +277,20 @@ TEST_CASE("simgrid::mc::odpor::Execution: Testing Racing Events and Initials")
     // The same logic above eliminates events before 6
     REQUIRE(execution.get_racing_events_of(9) == std::unordered_set<Execution::EventHandle>{6});
   }
-}
\ No newline at end of file
+}
+
+TEST_CASE("simgrid::mc::odpor::Execution: Testing Races and Conditions")
+{
+  const auto a1 = std::make_shared<DependentAction>(Transition::Type::UNKNOWN, 2);
+  const auto a2 = std::make_shared<IndependentAction>(Transition::Type::UNKNOWN, 2);
+  const auto a3 = std::make_shared<IndependentAction>(Transition::Type::UNKNOWN, 2);
+  const auto a4 = std::make_shared<IndependentAction>(Transition::Type::UNKNOWN, 1);
+  const auto a5 = std::make_shared<DependentAction>(Transition::Type::UNKNOWN, 3);
+
+  Execution execution;
+  execution.push_transition(a1);
+  execution.push_transition(a2);
+  execution.push_transition(a3);
+  execution.push_transition(a4);
+  execution.push_transition(a5);
+}