diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-09-05 09:32:11 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-09-05 09:32:11 +0000 |
commit | 2823ee0b1f435c7951f4c07e3fbb068b62d0b182 (patch) | |
tree | 4c72e0cf35ab08bfb0af74991751def84434313c | |
parent | c9c8373f3827cac1a1ce18700b1cd85b7425a814 (diff) | |
download | mpfr-2823ee0b1f435c7951f4c07e3fbb068b62d0b182.tar.gz |
[tests]
* toutimpl.c: Changed the filename of the result file like what
has been done in other test programs, to make sure that it will
not be reused by mistake. Removed comments about tmpname (which
does not exist).
* Makefile.am: Added this filename to CLEANFILES (even though the
file is removed by the test program, an error could occur before
its actual removal).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11699 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/toutimpl.c | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index e027eeac5..6db5fa8ec 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -52,7 +52,7 @@ AM_CPPFLAGS = -DSRCDIR='"$(srcdir)"' EXTRA_DIST = tgeneric.c tgeneric_ui.c mpf_compat.h inp_str.dat tmul.dat \ mpfrtest.dat mpfrtest2.dat -CLEANFILES = tfprintf_out.txt tout_str_out.txt tprintf_out.txt +CLEANFILES = tfprintf_out.txt tout_str_out.txt toutimpl_out.txt tprintf_out.txt LDADD = libfrtests.la $(MPFR_LIBM) $(MPFR_LIBQUADMATH) $(top_builddir)/src/libmpfr.la AM_CPPFLAGS += -I$(top_srcdir)/src -I$(top_builddir)/src diff --git a/tests/toutimpl.c b/tests/toutimpl.c index 83fbfee7e..d9888be72 100644 --- a/tests/toutimpl.c +++ b/tests/toutimpl.c @@ -23,10 +23,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #include "mpfr-test.h" -/* We output stdout to a file to check if it is correct - Is it a good idea? - We can't use tmpname since it is insecure */ -#define FILE_NAME "dummy.tmp" +#define FILE_NAME "toutimpl_out.txt" static const char Buffer[] = "@NaN@\n" @@ -71,8 +68,7 @@ main (void) exit (1); } - /* Reopen stdout to a file. All errors will be put to stderr - Can't use tmpname since it is unsecure */ + /* Reopen stdout to a file. All errors will be put to stderr. */ if (freopen (FILE_NAME, "w", stdout) == NULL) { printf ("Error can't redirect stdout\n"); |