More locale cleanups. Fully specify locales in iostream tests.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@140247 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Chisnall
2011-09-21 12:09:17 +00:00
parent c512df1950
commit 6b8ac3acda
4 changed files with 22 additions and 22 deletions

View File

@@ -38,7 +38,7 @@ void f1(std::ios_base::event ev, std::ios_base& stream, int index)
assert(!g1_called);
assert(!g2_called);
assert(!g3_called);
assert(stream.getloc().name() == "en_US");
assert(stream.getloc().name() == "en_US.UTF-8");
assert(index == 4);
f1_called = true;
}
@@ -53,7 +53,7 @@ void f2(std::ios_base::event ev, std::ios_base& stream, int index)
assert(!g1_called);
assert(!g2_called);
assert(!g3_called);
assert(stream.getloc().name() == "en_US");
assert(stream.getloc().name() == "en_US.UTF-8");
assert(index == 5);
f2_called = true;
}
@@ -68,7 +68,7 @@ void g1(std::ios_base::event ev, std::ios_base& stream, int index)
assert(!g1_called);
assert( g2_called);
assert( g3_called);
assert(stream.getloc().name() == "fr_FR");
assert(stream.getloc().name() == "fr_FR.UTF-8");
assert(index == 7);
g1_called = true;
}
@@ -83,7 +83,7 @@ void g2(std::ios_base::event ev, std::ios_base& stream, int index)
assert(!g1_called);
assert(!g2_called);
assert( g3_called);
assert(stream.getloc().name() == "fr_FR");
assert(stream.getloc().name() == "fr_FR.UTF-8");
assert(index == 8);
g2_called = true;
}
@@ -98,7 +98,7 @@ void g3(std::ios_base::event ev, std::ios_base& stream, int index)
assert(!g1_called);
assert(!g2_called);
assert(!g3_called);
assert(stream.getloc().name() == "fr_FR");
assert(stream.getloc().name() == "fr_FR.UTF-8");
assert(index == 9);
g3_called = true;
}
@@ -111,7 +111,7 @@ int main()
ios1.flags(std::ios::boolalpha | std::ios::dec | std::ios::fixed);
ios1.precision(1);
ios1.width(11);
ios1.imbue(std::locale("en_US"));
ios1.imbue(std::locale("en_US.UTF-8"));
ios1.exceptions(std::ios::failbit);
ios1.setstate(std::ios::eofbit);
ios1.register_callback(f1, 4);
@@ -131,7 +131,7 @@ int main()
ios2.flags(std::ios::showpoint | std::ios::uppercase);
ios2.precision(2);
ios2.width(12);
ios2.imbue(std::locale("fr_FR"));
ios2.imbue(std::locale("fr_FR.UTF-8"));
ios2.exceptions(std::ios::eofbit);
ios2.setstate(std::ios::goodbit);
ios2.register_callback(g1, 7);
@@ -165,7 +165,7 @@ int main()
assert(ios1.flags() == (std::ios::showpoint | std::ios::uppercase));
assert(ios1.precision() == 2);
assert(ios1.width() == 12);
assert(ios1.getloc().name() == "fr_FR");
assert(ios1.getloc().name() == "fr_FR.UTF-8");
assert(ios1.exceptions() == std::ios::eofbit);
assert(f1_called);
assert(f2_called);