X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fdata%2Fdatasheet-test.c;h=db21ff33fe658e132fa8769f15a31ab2ca887fa0;hb=14f4522a17db23e67a6fa17876633cc6260cb42b;hp=532b883faa1980f0671e249a27a9b1d71c5728ee;hpb=5f91f0868ec7cdbdb7900a2cb6e876b467fb2a6e;p=pspp diff --git a/tests/data/datasheet-test.c b/tests/data/datasheet-test.c index 532b883faa..db21ff33fe 100644 --- a/tests/data/datasheet-test.c +++ b/tests/data/datasheet-test.c @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2007, 2009, 2010, 2014 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -153,9 +154,10 @@ check_datasheet_casereader (struct mc *mc, struct casereader *reader, { if (width == 0) mc_error (mc, "element %zu,%zu (of %zu,%zu) differs: " - "%g != %g", + "%.*g != %.*g", row, col, n_rows, n_columns, - case_num_idx (c, col), array[row][col].f); + DBL_DIG + 1, case_num_idx (c, col), + DBL_DIG + 1, array[row][col].f); else mc_error (mc, "element %zu,%zu (of %zu,%zu) differs: " "'%.*s' != '%.*s'", @@ -217,8 +219,8 @@ check_datasheet (struct mc *mc, struct datasheet *ds, { if (width == 0) mc_error (mc, "element %zu,%zu (of %zu,%zu) differs: " - "%g != %g", row, col, n_rows, n_columns, - v.f, av->f); + "%.*g != %.*g", row, col, n_rows, n_columns, + DBL_DIG + 1, v.f, DBL_DIG + 1, av->f); else mc_error (mc, "element %zu,%zu (of %zu,%zu) differs: " "'%.*s' != '%.*s'",