From 9c0a87eb220aaf35c5ef164f4c240cc6e86d5c3a Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 28 May 2014 14:48:04 +0200 Subject: [PATCH] Use printf format %f instead of %e for this example. Workaround for bug on Windows where exponents are printed with 3 digits instead of 2. --- teshsuite/xbt/graphxml_usage/graphxml_usage.c | 2 +- teshsuite/xbt/graphxml_usage/graphxml_usage.tesh | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/teshsuite/xbt/graphxml_usage/graphxml_usage.c b/teshsuite/xbt/graphxml_usage/graphxml_usage.c index 7c4fe73c33..2a1f6f0d08 100644 --- a/teshsuite/xbt/graphxml_usage/graphxml_usage.c +++ b/teshsuite/xbt/graphxml_usage/graphxml_usage.c @@ -80,7 +80,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), "%e\t", adj[i * n + j]); + sprintf(buf + strlen(buf), "%6.3f\t", adj[i * n + j]); } XBT_INFO("%s", buf); buf[0] = '\000'; diff --git a/teshsuite/xbt/graphxml_usage/graphxml_usage.tesh b/teshsuite/xbt/graphxml_usage/graphxml_usage.tesh index fac32045fa..18798bc90c 100644 --- a/teshsuite/xbt/graphxml_usage/graphxml_usage.tesh +++ b/teshsuite/xbt/graphxml_usage/graphxml_usage.tesh @@ -4,14 +4,14 @@ $ $SG_TEST_EXENV ${bindir:=.}/graphxml_usage graph.xml > [0.000000] [test/INFO] ---- Testing XML export. Exporting to testgraph.xml ---- > [0.000000] [test/INFO] ---- Testing GraphViz export. Exporting to testgraph.dot ---- > [0.000000] [test/INFO] ---- Dumping Edge lengths ---- -> [0.000000] [test/INFO] 0.000000e+00 4.100000e-01 -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 -> [0.000000] [test/INFO] -1.000000e+00 0.000000e+00 5.100000e-01 -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 -> [0.000000] [test/INFO] -1.000000e+00 -1.000000e+00 0.000000e+00 5.000000e-01 -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 -> [0.000000] [test/INFO] -1.000000e+00 -1.000000e+00 -1.000000e+00 0.000000e+00 -1.000000e+00 3.800000e-01 -1.000000e+00 -1.000000e+00 -> [0.000000] [test/INFO] -1.000000e+00 -1.000000e+00 -1.000000e+00 3.600000e-01 0.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 -> [0.000000] [test/INFO] -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 0.000000e+00 -1.000000e+00 -1.000000e+00 -> [0.000000] [test/INFO] -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 3.800000e-01 -1.000000e+00 0.000000e+00 -1.000000e+00 -> [0.000000] [test/INFO] -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 -1.000000e+00 0.000000e+00 +> [0.000000] [test/INFO] 0.000 0.410 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 +> [0.000000] [test/INFO] -1.000 0.000 0.510 -1.000 -1.000 -1.000 -1.000 -1.000 +> [0.000000] [test/INFO] -1.000 -1.000 0.000 0.500 -1.000 -1.000 -1.000 -1.000 +> [0.000000] [test/INFO] -1.000 -1.000 -1.000 0.000 -1.000 0.380 -1.000 -1.000 +> [0.000000] [test/INFO] -1.000 -1.000 -1.000 0.360 0.000 -1.000 -1.000 -1.000 +> [0.000000] [test/INFO] -1.000 -1.000 -1.000 -1.000 -1.000 0.000 -1.000 -1.000 +> [0.000000] [test/INFO] -1.000 -1.000 -1.000 -1.000 0.380 -1.000 0.000 -1.000 +> [0.000000] [test/INFO] -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 0.000 > [0.000000] [test/INFO] ---- Testing Shortest Paths ---- > [0.000000] [test/INFO] A B B B B > [0.000000] [test/INFO] B C C C -- 2.20.1