Fix test failures introduced by PR #113697 (#116941)
[llvm-project.git] / libc / test / include / iszero_test.c
blobbe2d34ae3e395b94e5c2283afce43ce05acac674
1 //===-- Unittests for iszero 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"
10 #include <assert.h>
12 // check if macro is defined
13 #ifndef iszero
14 #error "iszero macro is not defined"
15 #else
16 int main(void) {
17 assert(iszero(1.0f) == 0);
18 assert(iszero(1.0) == 0);
19 assert(iszero(1.0L) == 0);
20 assert(iszero(0.0f) == 1);
21 assert(iszero(0.0) == 1);
22 assert(iszero(0.0L) == 1);
23 return 0;
25 #endif