forked from OSchip/llvm-project
Fix numeric.limits.members/traps.pass.cpp to pass on non-x86 architectures. Fixes bug #18468
llvm-svn: 200724
This commit is contained in:
parent
5ef98f7288
commit
0c8bb8f0f2
|
|
@ -13,6 +13,12 @@
|
||||||
|
|
||||||
#include <limits>
|
#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>
|
template <class T, bool expected>
|
||||||
void
|
void
|
||||||
test()
|
test()
|
||||||
|
|
@ -26,22 +32,22 @@ test()
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
test<bool, false>();
|
test<bool, false>();
|
||||||
test<char, true>();
|
test<char, integral_types_trap>();
|
||||||
test<signed char, true>();
|
test<signed char, integral_types_trap>();
|
||||||
test<unsigned char, true>();
|
test<unsigned char, integral_types_trap>();
|
||||||
test<wchar_t, true>();
|
test<wchar_t, integral_types_trap>();
|
||||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
test<char16_t, true>();
|
test<char16_t, integral_types_trap>();
|
||||||
test<char32_t, true>();
|
test<char32_t, integral_types_trap>();
|
||||||
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
test<short, true>();
|
test<short, integral_types_trap>();
|
||||||
test<unsigned short, true>();
|
test<unsigned short, integral_types_trap>();
|
||||||
test<int, true>();
|
test<int, integral_types_trap>();
|
||||||
test<unsigned int, true>();
|
test<unsigned int, integral_types_trap>();
|
||||||
test<long, true>();
|
test<long, integral_types_trap>();
|
||||||
test<unsigned long, true>();
|
test<unsigned long, integral_types_trap>();
|
||||||
test<long long, true>();
|
test<long long, integral_types_trap>();
|
||||||
test<unsigned long long, true>();
|
test<unsigned long long, integral_types_trap>();
|
||||||
test<float, false>();
|
test<float, false>();
|
||||||
test<double, false>();
|
test<double, false>();
|
||||||
test<long double, false>();
|
test<long double, false>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue