1 //===----------------------------------------------------------------------===//
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 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
17 #include "test_macros.h"
23 assert(std::numeric_limits
<T
>::epsilon() == expected
);
24 assert(std::numeric_limits
<const T
>::epsilon() == expected
);
25 assert(std::numeric_limits
<volatile T
>::epsilon() == expected
);
26 assert(std::numeric_limits
<const volatile T
>::epsilon() == expected
);
34 test
<unsigned char>(0);
36 #if TEST_STD_VER > 17 && defined(__cpp_char8_t)
42 test
<unsigned short>(0);
44 test
<unsigned int>(0);
46 test
<unsigned long>(0);
48 test
<unsigned long long>(0);
49 #ifndef TEST_HAS_NO_INT128
53 test
<float>(FLT_EPSILON
);
54 test
<double>(DBL_EPSILON
);
55 test
<long double>(LDBL_EPSILON
);