From 6e83adca90138a9938524736c05cca0616b6bee1 Mon Sep 17 00:00:00 2001 From: dimitrov Date: Wed, 29 Mar 2006 13:16:35 +0000 Subject: [PATCH] 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 --- testsuite/xbt/graphxml_usage.c | 6 ++++++ 1 file changed, 6 insertions(+) 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