mirror of
https://github.com/llvm-mirror/libcxx.git
synced 2025-10-24 03:32:35 +08:00
[libc++] fix test for unsigned char
On some systems char is unsigned. If that is the case, we will now test signed char twice in std::abs. NFC. Fixes the build bots. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@369413 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -41,8 +41,14 @@ void test_big()
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
// On some systems char is unsigned.
|
||||
// If that is the case, we should just test signed char twice.
|
||||
typedef typename std::conditional<
|
||||
std::is_signed<char>::value, char, signed char
|
||||
>::type SignedChar;
|
||||
|
||||
test_abs<short int, typename correct_size_int<short int>::type>();
|
||||
test_abs<char, typename correct_size_int<char>::type>();
|
||||
test_abs<SignedChar, typename correct_size_int<SignedChar>::type>();
|
||||
test_abs<signed char, typename correct_size_int<signed char>::type>();
|
||||
|
||||
test_abs<int, typename correct_size_int<int>::type>();
|
||||
|
Reference in New Issue
Block a user