X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/39cda11a085bba2828c68949e31861204ec40b18..54d4db7b7c8fa95028c7c279b87abaed1ba6c646:/testsuite/xbt/graphxml_usage.c diff --git a/testsuite/xbt/graphxml_usage.c b/testsuite/xbt/graphxml_usage.c index 7839cd796c..965c1e52eb 100644 --- a/testsuite/xbt/graphxml_usage.c +++ b/testsuite/xbt/graphxml_usage.c @@ -1,6 +1,6 @@ /* A few basic tests for the graphxml library */ -/* Copyright (c) 2006, 2007, 2008, 2009, 2010. The SimGrid Team. +/* Copyright (c) 2006-2013. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -12,7 +12,7 @@ #include #ifdef _MSC_VER -#define snprintf _snprintf +#define snprintf _snprintf #endif #include "xbt/module.h" @@ -79,7 +79,7 @@ void test(char *graph_file) buf = xbt_new0(char, n * 20); for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { - sprintf(buf + strlen(buf), "%le\t", adj[i * n + j]); + sprintf(buf + strlen(buf), "%e\t", adj[i * n + j]); } XBT_INFO("%s", buf); buf[0] = '\000'; @@ -129,7 +129,7 @@ void test(char *graph_file) XBT_INFO("Before Node deletion: %lu nodes, %lu edges", xbt_dynar_length(nodes), xbt_dynar_length(edges)); - while (xbt_dynar_length(nodes)) + while (!xbt_dynar_is_empty(nodes)) xbt_graph_free_node(graph, *((xbt_node_t *) xbt_dynar_get_ptr(nodes, 0)), free_label, NULL); @@ -144,7 +144,7 @@ void test(char *graph_file) XBT_INFO("Before Edge deletion: %lu nodes, %lu edges", xbt_dynar_length(nodes), xbt_dynar_length(edges)); - while (xbt_dynar_length(edges)) + while (!xbt_dynar_is_empty(edges)) xbt_graph_free_edge(graph, *((xbt_edge_t *) xbt_dynar_get_ptr(edges, 0)), NULL); @@ -154,7 +154,7 @@ void test(char *graph_file) } xbt_graph_free_graph(graph, free_label, NULL, NULL); - xbt_graph_parse_lex_destroy(); + } #ifdef __BORLANDC__