Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: test/language.support/support.limits/limits/numeric.limits.members/traps.pass.cpp

Issue 734033004: libc++: fix the traps numeric_limits test (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-libcxx.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===----------------------------------------------------------------------===// 1 //===----------------------------------------------------------------------===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open 5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details. 6 // Source Licenses. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 9
10 // test numeric_limits 10 // test numeric_limits
11 11
12 // traps 12 // traps
13 13
14 #include <limits> 14 #include <limits>
15 15
16 #if (defined(__i386__) || defined(__x86_64__)) 16 #if (defined(__i386__) || defined(__x86_64__)) || defined(__pnacl__) // @LOCALMO D
17 static const bool integral_types_trap = true; 17 static const bool integral_types_trap = true;
18 #else 18 #else
19 static const bool integral_types_trap = false; 19 static const bool integral_types_trap = false;
20 #endif 20 #endif
21 21
22 template <class T, bool expected> 22 template <class T, bool expected>
23 void 23 void
24 test() 24 test()
25 { 25 {
26 static_assert(std::numeric_limits<T>::traps == expected, "traps test 1"); 26 static_assert(std::numeric_limits<T>::traps == expected, "traps test 1");
(...skipping 22 matching lines...) Expand all
49 test<long long, integral_types_trap>(); 49 test<long long, integral_types_trap>();
50 test<unsigned long long, integral_types_trap>(); 50 test<unsigned long long, integral_types_trap>();
51 #ifndef _LIBCPP_HAS_NO_INT128 51 #ifndef _LIBCPP_HAS_NO_INT128
52 test<__int128_t, integral_types_trap>(); 52 test<__int128_t, integral_types_trap>();
53 test<__uint128_t, integral_types_trap>(); 53 test<__uint128_t, integral_types_trap>();
54 #endif 54 #endif
55 test<float, false>(); 55 test<float, false>();
56 test<double, false>(); 56 test<double, false>();
57 test<long double, false>(); 57 test<long double, false>();
58 } 58 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698