Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Start the SimDag revolution: function factoring
[simgrid.git] / teshsuite / simdag / platforms / is_router_test.c
index 10bf464..5014b76 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2013. The SimGrid Team.
+/* Copyright (c) 2008-2015. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -6,14 +6,13 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "simdag/simdag.h"
-#include "surf/surf_private.h"
+#include "src/surf/surf_private.h"
 
 extern routing_platf_t routing_platf;
 
 int main(int argc, char **argv)
 {
-  /* initialisation of SD */
+  /* SD initialization */
   int size;
   xbt_lib_cursor_t cursor = NULL;
   char *key, *data;
@@ -28,12 +27,12 @@ int main(int argc, char **argv)
   /* creation of the environment */
   SD_create_environment(argv[1]);
 
-  size = xbt_lib_length(host_lib) + xbt_lib_length(as_router_lib);
+  size = xbt_dict_length(host_list) + xbt_lib_length(as_router_lib);
 
   printf("Workstation number: %d, link number: %d, elmts number: %d\n",
-         SD_workstation_get_number(), SD_link_get_number(), size);
+         SD_workstation_get_count(), sg_link_count(), size);
 
-  xbt_lib_foreach(host_lib, cursor, key, data) {
+  xbt_dict_foreach(host_list, cursor, key, data) {
     printf("   - Seen: \"%s\" is type : %d\n", key,
            (int) routing_get_network_element_type(key));
   }