mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-12-14 23:38:28 +00:00
Remove locale tests that depend on LC_ALL. These are non-portable.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@273359 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
03dacbe87a
commit
63a0af7a79
@ -52,23 +52,6 @@ int main()
|
||||
s3.data(), s3.data() + s3.size()) == 1);
|
||||
}
|
||||
}
|
||||
{
|
||||
std::locale l("");
|
||||
{
|
||||
const std::collate<char>& f = std::use_facet<std::collate<char> >(l);
|
||||
std::string s2("aaaaaaA");
|
||||
std::string s3("BaaaaaA");
|
||||
assert(f.compare(s2.data(), s2.data() + s2.size(),
|
||||
s3.data(), s3.data() + s3.size()) == 1);
|
||||
}
|
||||
{
|
||||
const std::collate<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(l);
|
||||
std::wstring s2(L"aaaaaaA");
|
||||
std::wstring s3(L"BaaaaaA");
|
||||
assert(f.compare(s2.data(), s2.data() + s2.size(),
|
||||
s3.data(), s3.data() + s3.size()) == 1);
|
||||
}
|
||||
}
|
||||
{
|
||||
std::locale l("C");
|
||||
{
|
||||
|
@ -25,8 +25,6 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
// Ensure that the default locale is not C. If it is, the second tests will fail.
|
||||
putenv(const_cast<char*>("LC_ALL=" LOCALE_en_US_UTF_8));
|
||||
{
|
||||
std::locale l(LOCALE_en_US_UTF_8);
|
||||
{
|
||||
@ -40,19 +38,6 @@ int main()
|
||||
assert(f.transform(x.data(), x.data() + x.size()) != x);
|
||||
}
|
||||
}
|
||||
{
|
||||
std::locale l("");
|
||||
{
|
||||
std::string x("1234");
|
||||
const std::collate<char>& f = std::use_facet<std::collate<char> >(l);
|
||||
assert(f.transform(x.data(), x.data() + x.size()) != x);
|
||||
}
|
||||
{
|
||||
std::wstring x(L"1234");
|
||||
const std::collate<wchar_t>& f = std::use_facet<std::collate<wchar_t> >(l);
|
||||
assert(f.transform(x.data(), x.data() + x.size()) != x);
|
||||
}
|
||||
}
|
||||
{
|
||||
std::locale l("C");
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user