X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/12ff962f066e304dbaa22cafcd6d5c7adb67c33c..7d195832dafde68afd749dd614e9a14d697bdb92:/src/kernel/routing/FullZone_test.cpp diff --git a/src/kernel/routing/FullZone_test.cpp b/src/kernel/routing/FullZone_test.cpp index 098f6ff2a8..ef1407f023 100644 --- a/src/kernel/routing/FullZone_test.cpp +++ b/src/kernel/routing/FullZone_test.cpp @@ -12,35 +12,24 @@ #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(); - simgrid::s4u::Link* link = zone->create_link("my_link", 1e6)->seal(); + const simgrid::s4u::Host* nic = zone->create_host("nic", 1e9)->seal(); + const simgrid::s4u::Link* link = zone->create_link("my_link", 1e6)->seal(); for (int i = 0; i < 10; i++) { std::string cpu_name = "CPU" + std::to_string(i); const simgrid::s4u::Host* cpu = zone->create_host(cpu_name, 1e9)->seal(); REQUIRE_NOTHROW(zone->add_route(cpu->get_netpoint(), nic->get_netpoint(), nullptr, nullptr, - std::vector{link}, true)); + {simgrid::s4u::LinkInRoute(link)}, true)); } -} \ No newline at end of file +}