From 7ce7ba6bfd17382d2cc32bb8eac0f73c1f51e278 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 26 Sep 2006 09:04:05 +0000 Subject: [PATCH] Changed test to reflect changes made to C99 in the TC. [SVN r35333] --- cstdint_test.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cstdint_test.cpp b/cstdint_test.cpp index 08c13be..88422de 100644 --- a/cstdint_test.cpp +++ b/cstdint_test.cpp @@ -113,10 +113,24 @@ void integral_constant_type_check(T1, T2) assert(sizeof(T1) == sizeof(T2)); assert(t1 == t2); #endif +#if defined(BOOST_HAS_STDINT_H) + // native headers are permitted to promote small + // unsigned types to type int: + if(sizeof(T1) >= sizeof(int)) + { + if(t1 > 0) + assert(t2 > 0); + else + assert(!(t2 > 0)); + } + else if(t1 < 0) + assert(!(t2 > 0)); +#else if(t1 > 0) assert(t2 > 0); else assert(!(t2 > 0)); +#endif }