[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:
Zoe Carver
2019-08-20 17:09:00 +00:00
parent 534d2b1146
commit 3eb5fd97e1

View File

@@ -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>();