1 //===-- Unittests for issubnormal macro -----------------------------------===// 2 // 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 6 // 7 //===----------------------------------------------------------------------===// 8 #include "include/llvm-libc-macros/math-function-macros.h" 9 10 #include <assert.h> 11 12 // check if macro is defined 13 #ifndef issubnormal 14 #error "issubnormal macro is not defined" 15 #else main(void)16int main(void) { 17 assert(issubnormal(1.819f) == 0); 18 assert(issubnormal(-1.726) == 0); 19 assert(issubnormal(1.426L) == 0); 20 assert(issubnormal(1e-308) == 1); 21 assert(issubnormal(-1e-308) == 1); 22 return 0; 23 } 24 #endif 25