From: dimitrov Date: Wed, 29 Mar 2006 13:16:35 +0000 (+0000) Subject: tests of xbt_graph_export_graphviz X-Git-Tag: v3.3~3349 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6e83adca90138a9938524736c05cca0616b6bee1?ds=sidebyside tests of xbt_graph_export_graphviz git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2009 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/testsuite/xbt/graphxml_usage.c b/testsuite/xbt/graphxml_usage.c index 833ae0e26c..e392d23d4e 100644 --- a/testsuite/xbt/graphxml_usage.c +++ b/testsuite/xbt/graphxml_usage.c @@ -20,6 +20,11 @@ void* node_label_and_data(xbt_node_t node,const char*label ,const char* data) char* lbl=xbt_strdup(label); return lbl; } + +static const char *node_name(xbt_node_t n) { + return n->data; +} + void test(char *graph_file); void test(char *graph_file) { @@ -35,6 +40,7 @@ void test(char *graph_file) double *adj=xbt_graph_get_length_matrix(graph); + xbt_graph_export_graphviz(graph, "graph.dot", node_name, NULL); for(i=0;i