Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Whitespaces!
[simgrid.git] / teshsuite / s4u / basic-parsing-test / basic-parsing-test.cpp
index c745023..24705bb 100644 (file)
@@ -19,18 +19,17 @@ static void test_one_link(const std::vector<sg4::Host*> hosts)
   double latency = 0;
   double min_bandwidth = -1;
 
-  XBT_INFO("Route between %s and %s\n", h1->get_cname(), h2->get_cname());
+  XBT_INFO("Route between %s and %s", h1->get_cname(), h2->get_cname());
   h1->route_to(h2, route, &latency);
-  XBT_INFO("Route size %zu\n", route.size());
+  XBT_INFO("Route size %zu", route.size());
 
   for (auto link: route) {
     double bandwidth = link->get_bandwidth();
-    XBT_INFO("  Link %s: latency = %f, bandwidth = %f\n", link->get_cname(), link->get_latency(), bandwidth);
+    XBT_INFO("  Link %s: latency = %f, bandwidth = %f", link->get_cname(), link->get_latency(), bandwidth);
     if (bandwidth < min_bandwidth || min_bandwidth < 0.0)
       min_bandwidth = bandwidth;
-
   }
-  XBT_INFO("Route latency = %f, route bandwidth = %f\n", latency, min_bandwidth);
+  XBT_INFO("Route latency = %f, route bandwidth = %f", latency, min_bandwidth);
 }
 
 static void test_full_link(const std::vector<sg4::Host*> hosts)
@@ -40,21 +39,20 @@ static void test_full_link(const std::vector<sg4::Host*> hosts)
     const sg4::Host* h1 = hosts[i];
     for (size_t j = 0; j < list_size; j++) {
       const sg4::Host* h2 = hosts[j];
-      XBT_INFO("Route between %s and %s\n", h1->get_cname(), h2->get_cname());
+      XBT_INFO("Route between %s and %s", h1->get_cname(), h2->get_cname());
       std::vector<sg4::Link*> route;
       double latency = 0;
       double min_bandwidth = -1;
       h1->route_to(h2, route, &latency);
-      XBT_INFO("  Route size %zu\n", route.size());
+      XBT_INFO("  Route size %zu", route.size());
 
       for (auto link: route) {
         double bandwidth = link->get_bandwidth();
-        XBT_INFO("  Link %s: latency = %f, bandwidth = %f\n", link->get_cname(), link->get_latency(), bandwidth);
+        XBT_INFO("  Link %s: latency = %f, bandwidth = %f", link->get_cname(), link->get_latency(), bandwidth);
         if (bandwidth < min_bandwidth || min_bandwidth < 0.0)
           min_bandwidth = bandwidth;
-
       }
-      XBT_INFO("  Route latency = %f, route bandwidth = %f\n", latency, min_bandwidth);
+      XBT_INFO("  Route latency = %f, route bandwidth = %f", latency, min_bandwidth);
     }
   }
 }
@@ -65,7 +63,7 @@ int main(int argc, char** argv)
 
   /* creation of the environment */
   e.load_platform(argv[1]);
-  XBT_INFO("Workstation number: %zu, link number: %zu\n", e.get_host_count(), e.get_link_count());
+  XBT_INFO("Workstation number: %zu, link number: %zu", e.get_host_count(), e.get_link_count());
 
   std::vector<simgrid::s4u::Host*> hosts = e.get_all_hosts();
   if (argc >= 3) {
@@ -74,7 +72,7 @@ int main(int argc, char** argv)
     if (!strcmp(argv[2], "FULL_LINK"))
       test_full_link(hosts);
     if (!strcmp(argv[2], "PROP"))
-      XBT_INFO("SG_TEST_mem: %s\n", sg4::Host::by_name("host1")->get_property("SG_TEST_mem"));
+      XBT_INFO("SG_TEST_mem: %s", sg4::Host::by_name("host1")->get_property("SG_TEST_mem"));
   }
 
   return 0;