Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
chain reaction when solving implicit cast smells
[simgrid.git] / src / kernel / routing / DijkstraZone_test.cpp
index 6aece3c..6fbbd30 100644 (file)
@@ -16,8 +16,8 @@ TEST_CASE("kernel::routing::DijkstraZone: Creating Zone", "")
 {
   simgrid::s4u::Engine e("test");
 
-  REQUIRE(simgrid::s4u::create_dijkstra_zone("test", false));
-  REQUIRE(simgrid::s4u::create_dijkstra_zone("test2", true));
+  SECTION("Regular Dijkstra") { REQUIRE(simgrid::s4u::create_dijkstra_zone("test", false)); }
+  SECTION("DijkstraCache") { REQUIRE(simgrid::s4u::create_dijkstra_zone("test", true)); }
 }
 
 TEST_CASE("kernel::routing::DijkstraZone: mix new routes and hosts", "")
@@ -25,12 +25,12 @@ TEST_CASE("kernel::routing::DijkstraZone: mix new routes and hosts", "")
   simgrid::s4u::Engine e("test");
   auto* zone = simgrid::s4u::create_dijkstra_zone("test", false);
 
-  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<simgrid::s4u::Link*>{link}, true));
+                                    {simgrid::s4u::LinkInRoute(link)}, true));
   }
 }