diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2014-02-03 23:26:56 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2014-02-03 23:26:56 +0000 |
commit | 0c8bb8f0f21d60d25f89e4552e5979c9d4ddcccc (patch) | |
tree | 63544f7587abe83161b670814cde03b2487cf2ba /libcxx/test/language.support/support.limits/limits/numeric.limits.members | |
parent | 5ef98f72880d99e01ffa132c49340bf4ba46027b (diff) | |
download | bcm5719-llvm-0c8bb8f0f21d60d25f89e4552e5979c9d4ddcccc.tar.gz bcm5719-llvm-0c8bb8f0f21d60d25f89e4552e5979c9d4ddcccc.zip |
Fix numeric.limits.members/traps.pass.cpp to pass on non-x86 architectures. Fixes bug #18468
llvm-svn: 200724
Diffstat (limited to 'libcxx/test/language.support/support.limits/limits/numeric.limits.members')
-rw-r--r-- | libcxx/test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/libcxx/test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp b/libcxx/test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp index 611ce56ddcd..a409740cf95 100644 --- a/libcxx/test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp +++ b/libcxx/test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp @@ -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>(); |