diff options
author | Joseph Myers <joseph@codesourcery.com> | 2017-06-28 14:20:21 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2017-06-28 14:20:21 +0000 |
commit | 2dd0aec531ad03e8e1642f8642930451b23fe2ba (patch) | |
tree | 269fb8bbec8b2830f52aba1e5065b43740fd82cb /math/libm-test-scalb.inc | |
parent | 073e8fa7739ed453d6854b834f290c263a6cdb9f (diff) | |
download | glibc-2dd0aec531ad03e8e1642f8642930451b23fe2ba.tar glibc-2dd0aec531ad03e8e1642f8642930451b23fe2ba.tar.gz glibc-2dd0aec531ad03e8e1642f8642930451b23fe2ba.tar.bz2 glibc-2dd0aec531ad03e8e1642f8642930451b23fe2ba.zip |
Add more thorough generated tgmath.h test.
This patch adds a more thorough test of tgmath.h macros, verifying
both the return type and the function called for all the cases of
valid argument types. (Cases with current problems - I've just filed
four bugs - are disabled or omitted pending fixing those problems.)
The test uses a Python generator (works with both Python 2 and 3) to
generate a C file which is then built and run as a test in the usual
way (and that C file includes its own dummy definitions of libm
functions similar to existing tgmath.h tests). The motivation is to
make it easier to add tests of tgmath.h for _Float128 when adding
tgmath.h support for that type; the _FloatN / _FloatNx support is
present in the script, but disabled until the tgmath.h support is
written.
Tested for x86_64, and for arm to check things in the long double =
double case. (In that case, it's OK to call either double or long
double functions when the selected type is double or long double, as
long as the return type of the macro is exactly correct.)
* math/gen-tgmath-tests.py: New file.
* math/Makefile [PYTHON] (tests): Add test-tgmath3.
[PYTHON] (generated): Add test-tgmath3.c.
[PYTHON] (CFLAGS-test-tgmath3.c): New variable.
[PYTHON] ($(objpfx)test-tgmath3.c): New rule.
Diffstat (limited to 'math/libm-test-scalb.inc')
0 files changed, 0 insertions, 0 deletions