1 //===-- Unittests for issignaling macro -----------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDSList-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
8 int issignaling(double);
9 int issignalingf(float);
10 int issignalingl(long double);
12 #include "include/llvm-libc-macros/math-function-macros.h"
16 // check if macro is defined
18 #error "issignaling macro is not defined"
21 assert(issignaling(__builtin_nans("")) == 1);
22 assert(issignaling(__builtin_nansf("")) == 1);
23 assert(issignaling(__builtin_nansl("")) == 1);
24 assert(issignaling(1.819f
) == 0);
25 assert(issignaling(-1.726) == 0);
26 assert(issignaling(1.426L) == 0);