]> Savannah Git Hosting - gnulib.git/commit
tests: Refactor functions for quiet NaNs.
authorBruno Haible <bruno@clisp.org>
Sat, 7 Oct 2023 13:09:23 +0000 (15:09 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 7 Oct 2023 13:09:23 +0000 (15:09 +0200)
commit46e4b5e5124374b6622d6e10f94364d3b8544fda
tree36288d91c65ebebf26d12f603db58b09bbca19a7
parent3ca749369a314f5fe1e13beb7b6ae068403eee52
tests: Refactor functions for quiet NaNs.

* tests/qnan.h: New file, based on tests/totalorder.c.
* tests/nan.h: Add double-inclusion guard.
* tests/test-signbit.c: Include qnan.h.
(test_signbitf, test_signbitd, test_signbitl): Simplify.
* tests/test-totalorder.c: Include qnan.h instead of NaN.h.
(TOTALORDER_NAN): Remove macro.
(TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
(positive_nan, negative_nan): Remove functions.
(main): Update.
* tests/test-totalorderf.c (TOTALORDER_NAN): Remove macro.
(TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
* tests/test-totalorderl.c (TOTALORDER_NAN): Remove macro.
(TOTALORDER_POSITIVE_NAN, TOTALORDER_NEGATIVE_NAN): New macros.
* modules/signbit-tests (Files): Add tests/nan.h, tests/qnan.h.
* modules/totalorder-tests (Files): Add tests/qnan.h.
(Depends-on): Add signbit.
* modules/totalorderf-tests (Files): Add tests/qnan.h.
(Depends-on): Add signbit.
* modules/totalorderl-tests (Files): Add tests/qnan.h.
(Depends-on): Add signbit.
ChangeLog
modules/signbit-tests
modules/totalorder-tests
modules/totalorderf-tests
modules/totalorderl-tests
tests/nan.h
tests/qnan.h [new file with mode: 0644]
tests/test-signbit.c
tests/test-totalorder.c
tests/test-totalorderf.c
tests/test-totalorderl.c