forked from OSchip/llvm-project
[SystemZ][z/OS][libcxx]: fix libcxx test cases failed on ebcdic mode on z/OS
This patch is to fix 2 libcxx test cases, test cases assumed 'a' > 'A' which is not case in z/OS platform on ebcdic mode, modified test cases to compare between upper letters or lower letters, or digits so ordering will be true for all platform. Differential Revision: https://reviews.llvm.org/D104748
This commit is contained in:
parent
f85b9d6443
commit
4f5ebfdcd6
|
@ -19,18 +19,18 @@
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
assert( std::char_traits<char>::lt('\0', 'A'));
|
assert(std::char_traits<char>::lt('\0', 'A') == ('\0' < 'A'));
|
||||||
assert(!std::char_traits<char>::lt('A', '\0'));
|
assert(std::char_traits<char>::lt('A', '\0') == ('A' < '\0'));
|
||||||
|
|
||||||
assert(!std::char_traits<char>::lt('a', 'a'));
|
assert(std::char_traits<char>::lt('a', 'a') == ('a' < 'a'));
|
||||||
assert( std::char_traits<char>::lt('A', 'a'));
|
assert(std::char_traits<char>::lt('A', 'a') == ('A' < 'a'));
|
||||||
assert(!std::char_traits<char>::lt('a', 'A'));
|
assert(std::char_traits<char>::lt('a', 'A') == ('a' < 'A'));
|
||||||
|
|
||||||
assert( std::char_traits<char>::lt('a', 'z'));
|
assert(std::char_traits<char>::lt('a', 'z') == ('a' < 'z'));
|
||||||
assert( std::char_traits<char>::lt('A', 'Z'));
|
assert(std::char_traits<char>::lt('A', 'Z') == ('A' < 'Z'));
|
||||||
|
|
||||||
assert( std::char_traits<char>::lt(' ', 'A'));
|
assert(std::char_traits<char>::lt(' ', 'A') == (' ' < 'A'));
|
||||||
assert( std::char_traits<char>::lt('A', '~'));
|
assert(std::char_traits<char>::lt('A', '~') == ('A' < '~'));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,8 +19,18 @@
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
assert(!std::char_traits<wchar_t>::lt(L'a', L'a'));
|
assert(std::char_traits<wchar_t>::lt(L'\0', L'A') == (L'\0' < L'A'));
|
||||||
assert( std::char_traits<wchar_t>::lt(L'A', L'a'));
|
assert(std::char_traits<wchar_t>::lt(L'A', L'\0') == (L'A' < L'\0'));
|
||||||
|
|
||||||
|
assert(std::char_traits<wchar_t>::lt(L'a', L'a') == (L'a' < L'a'));
|
||||||
|
assert(std::char_traits<wchar_t>::lt(L'A', L'a') == (L'A' < L'a'));
|
||||||
|
assert(std::char_traits<wchar_t>::lt(L'a', L'A') == (L'a' < L'A'));
|
||||||
|
|
||||||
|
assert(std::char_traits<wchar_t>::lt(L'a', L'z') == (L'a' < L'z'));
|
||||||
|
assert(std::char_traits<wchar_t>::lt(L'A', L'Z') == (L'A' < L'Z'));
|
||||||
|
|
||||||
|
assert(std::char_traits<wchar_t>::lt(L' ', L'A') == (L' ' < L'A'));
|
||||||
|
assert(std::char_traits<wchar_t>::lt(L'A', L'~') == (L'A' < L'~'));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue