blob: cc7eaac7de62b5c647a2b4bd1239d57b0852d47c [file] [log] [blame]
Dan Albert287553d2017-02-16 10:47:51 -08001//===----------------------------------------------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// <math.h>
11
12// isinf
13
14// XFAIL: linux
15
16#include <math.h>
17#include <type_traits>
18#include <cassert>
19
20int main()
21{
22#ifdef isinf
23#error isinf defined
24#endif
25 static_assert((std::is_same<decltype(isinf((float)0)), bool>::value), "");
26 static_assert((std::is_same<decltype(isinf((double)0)), bool>::value), "");
27 static_assert((std::is_same<decltype(isinf(0)), bool>::value), "");
28 static_assert((std::is_same<decltype(isinf((long double)0)), bool>::value), "");
29 assert(isinf(-1.0) == false);
30}