More fixes to the tests. Add UTF-8 encoding to all locales that don't specify one. Undefine some stdio.h macros that break the tests.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140252 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Chisnall
2011-09-21 14:59:10 +00:00
parent a824f53600
commit db2e99f852
7 changed files with 43 additions and 19 deletions

View File

@@ -39,7 +39,7 @@ int main()
{
testbuf<char> sb(" -$1,234,567.89");
std::istream is(&sb);
is.imbue(std::locale("en_US"));
is.imbue(std::locale("en_US.UTF-8"));
long double x = 0;
is >> std::get_money(x, false);
assert(x == -123456789);
@@ -47,7 +47,7 @@ int main()
{
testbuf<char> sb(" -USD 1,234,567.89");
std::istream is(&sb);
is.imbue(std::locale("en_US"));
is.imbue(std::locale("en_US.UTF-8"));
long double x = 0;
is >> std::get_money(x, true);
assert(x == -123456789);
@@ -55,7 +55,7 @@ int main()
{
testbuf<wchar_t> sb(L" -$1,234,567.89");
std::wistream is(&sb);
is.imbue(std::locale("en_US"));
is.imbue(std::locale("en_US.UTF-8"));
long double x = 0;
is >> std::get_money(x, false);
assert(x == -123456789);
@@ -63,7 +63,7 @@ int main()
{
testbuf<wchar_t> sb(L" -USD 1,234,567.89");
std::wistream is(&sb);
is.imbue(std::locale("en_US"));
is.imbue(std::locale("en_US.UTF-8"));
long double x = 0;
is >> std::get_money(x, true);
assert(x == -123456789);