X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fprintf-posix.h;h=e0fa53707113173b37a627a49b56fd96f60d3dfa;hb=88587173921b74394414c5367294588052fc91a3;hp=28944beb4274c14c4232502c971f6c967ae0c87d;hpb=3030c5b5e0a5199e16b05927da72c43c42f211c3;p=gnulib.git diff --git a/tests/test-fprintf-posix.h b/tests/test-fprintf-posix.h index 28944beb4..e0fa53707 100644 --- a/tests/test-fprintf-posix.h +++ b/tests/test-fprintf-posix.h @@ -1,5 +1,5 @@ /* Test of POSIX compatible vsprintf() and sprintf() functions. - Copyright (C) 2007-2009 Free Software Foundation, Inc. + Copyright (C) 2007-2011 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 @@ -16,6 +16,8 @@ /* Written by Bruno Haible , 2007. */ +#include "infinity.h" + static void test_function (int (*my_fprintf) (FILE *, const char *, ...)) { @@ -37,13 +39,13 @@ test_function (int (*my_fprintf) (FILE *, const char *, ...)) my_fprintf (stdout, "%a %d\n", 0.0, 33, 44, 55); /* Positive infinity. */ - my_fprintf (stdout, "%a %d\n", 1.0 / 0.0, 33, 44, 55); + my_fprintf (stdout, "%a %d\n", Infinityd (), 33, 44, 55); /* Negative infinity. */ - my_fprintf (stdout, "%a %d\n", -1.0 / 0.0, 33, 44, 55); + my_fprintf (stdout, "%a %d\n", - Infinityd (), 33, 44, 55); /* FLAG_ZERO with infinite number. */ - my_fprintf (stdout, "%010a %d\n", 1.0 / 0.0, 33, 44, 55); + my_fprintf (stdout, "%010a %d\n", Infinityd (), 33, 44, 55); /* Test the support of the %f format directive. */