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>
 | 
			
		||||
 | 
			
		||||
#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…
	
		Reference in New Issue