Fix numeric.limits.members/traps.pass.cpp to pass on non-x86 architectures. Fixes bug #18468
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@200724 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e1678a18d9
commit
13fbe9d5e3
@ -13,6 +13,12 @@
|
||||
|
||||
#include <limits>
|
||||
|
||||
#if (defined(__i386__) || defined(__x86_64__))
|
||||
static const bool integral_types_trap = true;
|
||||
#else
|
||||
static const bool integral_types_trap = false;
|
||||
#endif
|
||||
|
||||
template <class T, bool expected>
|
||||
void
|
||||
test()
|
||||
@ -26,22 +32,22 @@ test()
|
||||
int main()
|
||||
{
|
||||
test<bool, false>();
|
||||
test<char, true>();
|
||||
test<signed char, true>();
|
||||
test<unsigned char, true>();
|
||||
test<wchar_t, true>();
|
||||
test<char, integral_types_trap>();
|
||||
test<signed char, integral_types_trap>();
|
||||
test<unsigned char, integral_types_trap>();
|
||||
test<wchar_t, integral_types_trap>();
|
||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<char16_t, true>();
|
||||
test<char32_t, true>();
|
||||
test<char16_t, integral_types_trap>();
|
||||
test<char32_t, integral_types_trap>();
|
||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||
test<short, true>();
|
||||
test<unsigned short, true>();
|
||||
test<int, true>();
|
||||
test<unsigned int, true>();
|
||||
test<long, true>();
|
||||
test<unsigned long, true>();
|
||||
test<long long, true>();
|
||||
test<unsigned long long, true>();
|
||||
test<short, integral_types_trap>();
|
||||
test<unsigned short, integral_types_trap>();
|
||||
test<int, integral_types_trap>();
|
||||
test<unsigned int, integral_types_trap>();
|
||||
test<long, integral_types_trap>();
|
||||
test<unsigned long, integral_types_trap>();
|
||||
test<long long, integral_types_trap>();
|
||||
test<unsigned long long, integral_types_trap>();
|
||||
test<float, false>();
|
||||
test<double, false>();
|
||||
test<long double, false>();
|
||||
|
Loading…
x
Reference in New Issue
Block a user