SECTION("Initialization with one or more elements")
{
- UnfoldingEvent e1, e2, e3;
+ UnfoldingEvent e1;
+ UnfoldingEvent e2;
+ UnfoldingEvent e3;
SECTION("Set initializer")
{
TEST_CASE("simgrid::mc::udpor::EventSet: Insertions")
{
EventSet event_set;
- UnfoldingEvent e1, e2, e3;
+ UnfoldingEvent e1;
+ UnfoldingEvent e2;
+ UnfoldingEvent e3;
SECTION("Inserting unique elements")
{
UnfoldingEvent e2;
UnfoldingEvent e3;
UnfoldingEvent e4;
- EventSet A{&e1, &e2, &e3}, B{&e1, &e2, &e3}, C{&e1, &e2, &e3};
+ EventSet A{&e1, &e2, &e3};
+ EventSet B{&e1, &e2, &e3};
+ EventSet C{&e1, &e2, &e3};
SECTION("Equality implies containment")
{
TEST_CASE("simgrid::mc::udpor::EventSet: Set Union Tests")
{
- UnfoldingEvent e1, e2, e3, e4;
+ UnfoldingEvent e1;
+ UnfoldingEvent e2;
+ UnfoldingEvent e3;
+ UnfoldingEvent e4;
// C = A + B
- EventSet A{&e1, &e2, &e3}, B{&e2, &e3, &e4}, C{&e1, &e2, &e3, &e4}, D{&e1, &e3};
+ EventSet A{&e1, &e2, &e3};
+ EventSet B{&e2, &e3, &e4};
+ EventSet C{&e1, &e2, &e3, &e4};
+ EventSet D{&e1, &e3};
SECTION("Unions with no effect")
{
// D is a subset of A and C
// E is a subset of B and C
// F is a subset of A, C, and D
- EventSet A{&e1, &e2, &e3}, B{&e2, &e3, &e4}, C{&e1, &e2, &e3, &e4}, D{&e1, &e3}, E{&e4}, F{&e1};
+ EventSet A{&e1, &e2, &e3};
+ EventSet B{&e2, &e3, &e4};
+ EventSet C{&e1, &e2, &e3, &e4};
+ EventSet D{&e1, &e3};
+ EventSet E{&e4};
+ EventSet F{&e1};
SECTION("Difference with no effect")
{
TEST_CASE("simgrid::mc::udpor::EventSet: Subset Tests")
{
- UnfoldingEvent e1, e2, e3, e4;
+ UnfoldingEvent e1;
+ UnfoldingEvent e2;
+ UnfoldingEvent e3;
+ UnfoldingEvent e4;
// A is a subset of C only
// B is a subset of C only
// D is NOT a subset of B
// B is NOT a subset of D
// ...
- EventSet A{&e1, &e2, &e3}, B{&e2, &e3, &e4}, C{&e1, &e2, &e3, &e4}, D{&e1, &e3}, E{&e2, &e3}, F{&e1, &e2, &e3};
+ EventSet A{&e1, &e2, &e3};
+ EventSet B{&e2, &e3, &e4};
+ EventSet C{&e1, &e2, &e3, &e4};
+ EventSet D{&e1, &e3};
+ EventSet E{&e2, &e3};
+ EventSet F{&e1, &e2, &e3};
SECTION("Subset operator properties")
{
return topological_ordering.end();
}
-bool maximal_subsets_iterator::bookkeeper::is_candidate_event(const UnfoldingEvent* e) const
+bool maximal_subsets_iterator::Bookkeeper::is_candidate_event(const UnfoldingEvent* e) const
{
if (const auto e_count = event_counts.find(e); e_count != event_counts.end()) {
return e_count->second == 0;
}
maximal_subsets_iterator::topological_order_position
-maximal_subsets_iterator::bookkeeper::find_next_candidate_event(topological_order_position first,
+maximal_subsets_iterator::Bookkeeper::find_next_candidate_event(topological_order_position first,
topological_order_position last) const
{
return std::find_if(first, last, [&](const UnfoldingEvent* e) { return is_candidate_event(e); });
}
-void maximal_subsets_iterator::bookkeeper::mark_included_in_maximal_set(const UnfoldingEvent* e)
+void maximal_subsets_iterator::Bookkeeper::mark_included_in_maximal_set(const UnfoldingEvent* e)
{
const auto e_local_config = e->get_local_config();
for (const auto e_hist : e_local_config) {
}
}
-void maximal_subsets_iterator::bookkeeper::mark_removed_from_maximal_set(const UnfoldingEvent* e)
+void maximal_subsets_iterator::Bookkeeper::mark_removed_from_maximal_set(const UnfoldingEvent* e)
{
const auto e_local_config = e->get_local_config();
for (const auto e_hist : e_local_config) {
}
}
-} // namespace simgrid::mc::udpor
\ No newline at end of file
+} // namespace simgrid::mc::udpor