[libcxx] r273359 - Remove locale tests that depend on LC_ALL. These are non-portable.
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 21 18:33:38 PDT 2016
Author: ericwf
Date: Tue Jun 21 20:33:38 2016
New Revision: 273359
URL: http://llvm.org/viewvc/llvm-project?rev=273359&view=rev
Log:
Remove locale tests that depend on LC_ALL. These are non-portable.
Modified:
libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp
libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp
Modified: libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp?rev=273359&r1=273358&r2=273359&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate.byname/compare.pass.cpp Tue Jun 21 20:33:38 2016
@@ -53,23 +53,6 @@ int main()
}
}
{
- 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");
{
const std::collate<char>& f = std::use_facet<std::collate<char> >(l);
Modified: libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp?rev=273359&r1=273358&r2=273359&view=diff
==============================================================================
--- libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp (original)
+++ libcxx/trunk/test/std/localization/locale.categories/category.collate/locale.collate.byname/transform.pass.cpp Tue Jun 21 20:33:38 2016
@@ -25,26 +25,11 @@
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);
{
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("");
- {
- 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);
}
{
More information about the cfe-commits
mailing list