From a074795946943ed56f5bf46578e6b8e3e7eeb63b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 19 Jan 2010 03:05:13 +0100 Subject: [PATCH] Tests for module 'sinl'. --- ChangeLog | 4 ++++ modules/sinl-tests | 14 ++++++++++++++ tests/test-sinl.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 modules/sinl-tests create mode 100644 tests/test-sinl.c diff --git a/ChangeLog b/ChangeLog index 74325a25b8..1e5360780f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-01-18 Bruno Haible + Tests for module 'sinl'. + * modules/sinl-tests: New file. + * tests/test-sinl.c: New file. + Tests for module 'logl'. * modules/logl-tests: New file. * tests/test-logl.c: New file. diff --git a/modules/sinl-tests b/modules/sinl-tests new file mode 100644 index 0000000000..357ad627fe --- /dev/null +++ b/modules/sinl-tests @@ -0,0 +1,14 @@ +Files: +tests/test-sinl.c +tests/signature.h +tests/macros.h + +Depends-on: +fpucw + +configure.ac: + +Makefile.am: +TESTS += test-sinl +check_PROGRAMS += test-sinl +test_sinl_LDADD = $(LDADD) @SINL_LIBM@ diff --git a/tests/test-sinl.c b/tests/test-sinl.c new file mode 100644 index 0000000000..19e7e62ff8 --- /dev/null +++ b/tests/test-sinl.c @@ -0,0 +1,43 @@ +/* Test of sinl() function. + Copyright (C) 2010 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 + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* Written by Bruno Haible , 2010. */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (sinl, long double, (long double)); + +#include "fpucw.h" +#include "macros.h" + +long double y; + +int +main () +{ + DECL_LONG_DOUBLE_ROUNDING + + BEGIN_LONG_DOUBLE_ROUNDING (); + + /* A particular value. */ + y = sinl (0.6L); + ASSERT (y >= 0.5646424733L && y <= 0.5646424734L); + + return 0; +} -- 2.30.2