More +.UTF-8 fixes.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140262 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Chisnall
2011-09-21 17:35:42 +00:00
parent 709c3d27f5
commit 86698890db
20 changed files with 31 additions and 31 deletions

View File

@@ -27,7 +27,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
const std::collate<char>& f = std::use_facet<std::collate<char> >(l);
std::string s2("aaaaaaA");

View File

@@ -21,7 +21,7 @@
int main()
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
std::string x1("1234");
std::string x2("12345");

View File

@@ -22,9 +22,9 @@
int main()
{
// Ensure that the default locale is not C. If it is, the second tests will fail.
setenv("LANG", "en_US", 1);
setenv("LANG", "en_US.UTF-8", 1);
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
std::string x("1234");
const std::collate<char>& f = std::use_facet<std::collate<char> >(l);

View File

@@ -29,7 +29,7 @@
int main()
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
assert(std::has_facet<std::collate_byname<char> >(l));
assert(&std::use_facet<std::collate<char> >(l)

View File

@@ -38,12 +38,12 @@ int my_facet::count = 0;
int main()
{
{
std::locale l(std::locale::classic(), new my_facet("en_US"));
std::locale l(std::locale::classic(), new my_facet("en_US.UTF-8"));
assert(my_facet::count == 1);
}
assert(my_facet::count == 0);
{
my_facet f("en_US", 1);
my_facet f("en_US.UTF-8", 1);
assert(my_facet::count == 1);
{
std::locale l(std::locale::classic(), &f);
@@ -53,12 +53,12 @@ int main()
}
assert(my_facet::count == 0);
{
std::locale l(std::locale::classic(), new my_facet(std::string("en_US")));
std::locale l(std::locale::classic(), new my_facet(std::string("en_US.UTF-8")));
assert(my_facet::count == 1);
}
assert(my_facet::count == 0);
{
my_facet f(std::string("en_US"), 1);
my_facet f(std::string("en_US.UTF-8"), 1);
assert(my_facet::count == 1);
{
std::locale l(std::locale::classic(), &f);

View File

@@ -20,7 +20,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<wchar_t> F;
const F& f = std::use_facet<F>(l);

View File

@@ -23,7 +23,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<wchar_t> F;
const F& f = std::use_facet<F>(l);

View File

@@ -39,7 +39,7 @@ int main()
}
}
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<wchar_t> F;
const F& f = std::use_facet<F>(l);

View File

@@ -23,7 +23,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<wchar_t> F;
const F& f = std::use_facet<F>(l);

View File

@@ -23,7 +23,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<wchar_t> F;
const F& f = std::use_facet<F>(l);

View File

@@ -19,7 +19,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<char> F;
const F& f = std::use_facet<F>(l);
@@ -51,7 +51,7 @@ int main()
}
}
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<wchar_t> F;
const F& f = std::use_facet<F>(l);

View File

@@ -20,7 +20,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<char> F;
const F& f = std::use_facet<F>(l);
@@ -54,7 +54,7 @@ int main()
}
}
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<wchar_t> F;
const F& f = std::use_facet<F>(l);

View File

@@ -19,7 +19,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<char> F;
const F& f = std::use_facet<F>(l);
@@ -51,7 +51,7 @@ int main()
}
}
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<wchar_t> F;
const F& f = std::use_facet<F>(l);

View File

@@ -20,7 +20,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<char> F;
const F& f = std::use_facet<F>(l);
@@ -54,7 +54,7 @@ int main()
}
}
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<wchar_t> F;
const F& f = std::use_facet<F>(l);

View File

@@ -28,7 +28,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
assert(std::has_facet<std::ctype_byname<char> >(l));
assert(&std::use_facet<std::ctype<char> >(l)

View File

@@ -22,7 +22,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<wchar_t> F;
const F& f = std::use_facet<F>(l);

View File

@@ -23,7 +23,7 @@
int main()
{
{
std::locale l("en_US");
std::locale l("en_US.UTF-8");
{
typedef std::ctype<wchar_t> F;
const F& f = std::use_facet<F>(l);