//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // test numeric_limits // epsilon() #include #include #include template void test(T expected) { assert(std::numeric_limits::epsilon() == expected); assert(std::numeric_limits::epsilon() == expected); assert(std::numeric_limits::epsilon() == expected); assert(std::numeric_limits::epsilon() == expected); } int main() { test(false); test(0); test(0); test(0); test(0); #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS test(0); test(0); #endif // _LIBCPP_HAS_NO_UNICODE_CHARS test(0); test(0); test(0); test(0); test(0); test(0); test(0); test(0); #ifndef _LIBCPP_HAS_NO_INT128 test<__int128_t>(0); test<__uint128_t>(0); #endif test(FLT_EPSILON); test(DBL_EPSILON); test(LDBL_EPSILON); }