1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // test numeric_limits
22 assert(std::numeric_limits<T>::epsilon() == expected);
23 assert(std::numeric_limits<const T>::epsilon() == expected);
24 assert(std::numeric_limits<volatile T>::epsilon() == expected);
25 assert(std::numeric_limits<const volatile T>::epsilon() == expected);
33 test<unsigned char>(0);
35 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
38 #endif // _LIBCPP_HAS_NO_UNICODE_CHARS
40 test<unsigned short>(0);
42 test<unsigned int>(0);
44 test<unsigned long>(0);
46 test<unsigned long long>(0);
47 test<float>(FLT_EPSILON);
48 test<double>(DBL_EPSILON);
49 test<long double>(LDBL_EPSILON);