Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix loop: iterator is invalid after insertion.
[simgrid.git] / src / kernel / routing / FullZone_test.cpp
index 098f6ff..f630fdc 100644 (file)
 #include "simgrid/s4u/NetZone.hpp"
 #include "src/surf/network_interface.hpp" //LinkImpl
 
-namespace {
-class EngineWrapper {
-  int argc = 1;
-  char* argv;
-  simgrid::s4u::Engine e;
-
-public:
-  explicit EngineWrapper(std::string name) : argv(&name[0]), e(&argc, &argv) {}
-};
-} // namespace
-
 TEST_CASE("kernel::routing::FullZone: Creating Zone", "")
 {
-  EngineWrapper e("test");
+  simgrid::s4u::Engine e("test");
 
   REQUIRE(simgrid::s4u::create_full_zone("test"));
 }
 
 TEST_CASE("kernel::routing::FullZone: mix new routes and hosts", "[bug]")
 {
-  EngineWrapper e("test");
+  simgrid::s4u::Engine e("test");
   auto* zone = simgrid::s4u::create_full_zone("test");
 
   const simgrid::s4u::Host* nic = zone->create_host("nic", 1e9)->seal();
@@ -43,4 +32,4 @@ TEST_CASE("kernel::routing::FullZone: mix new routes and hosts", "[bug]")
     REQUIRE_NOTHROW(zone->add_route(cpu->get_netpoint(), nic->get_netpoint(), nullptr, nullptr,
                                     std::vector<simgrid::s4u::Link*>{link}, true));
   }
-}
\ No newline at end of file
+}