summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/localization
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/std/localization')
-rw-r--r--libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp60
1 files changed, 11 insertions, 49 deletions
diff --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
index 427d7c5515f..d9e7f3cd514 100644
--- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.put/locale.time.put.members/put2.pass.cpp
@@ -14,9 +14,6 @@
// iter_type put(iter_type s, ios_base& str, char_type fill, const tm* t,
// char format, char modifier = 0) const;
-// TODO: investigation needed
-// XFAIL: linux-gnu
-
#include <locale>
#include <cassert>
#include "test_iterators.h"
@@ -36,7 +33,7 @@ int main()
const my_facet f(1);
char str[200];
output_iterator<char*> iter;
- tm t = {0};
+ tm t = {};
t.tm_sec = 6;
t.tm_min = 3;
t.tm_hour = 13;
@@ -44,7 +41,7 @@ int main()
t.tm_mon = 4;
t.tm_year = 109;
t.tm_wday = 6;
- t.tm_yday = -1;
+ t.tm_yday = 121;
t.tm_isdst = 1;
std::ios ios(0);
{
@@ -160,12 +157,12 @@ int main()
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'U', 'O');
std::string ex(str, iter.base());
- assert(ex == "00");
+ assert(ex == "17");
}
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'V', 'O');
std::string ex(str, iter.base());
- assert(ex == "52");
+ assert(ex == "18");
}
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'w', 'O');
@@ -175,7 +172,7 @@ int main()
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'W', 'O');
std::string ex(str, iter.base());
- assert(ex == "00");
+ assert(ex == "17");
}
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'y', 'O');
@@ -183,11 +180,6 @@ int main()
assert(ex == "09");
}
{
- iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'B', 'O');
- std::string ex(str, iter.base());
- assert(ex == "May");
- }
- {
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'e');
std::string ex(str, iter.base());
assert(ex == " 2");
@@ -200,12 +192,12 @@ int main()
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'G');
std::string ex(str, iter.base());
- assert(ex == "2008");
+ assert(ex == "2009");
}
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'g');
std::string ex(str, iter.base());
- assert(ex == "08");
+ assert(ex == "09");
}
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'H');
@@ -225,17 +217,7 @@ int main()
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'j');
std::string ex(str, iter.base());
- assert(ex == "000");
- }
- {
- iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'k');
- std::string ex(str, iter.base());
- assert(ex == "13");
- }
- {
- iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'l');
- std::string ex(str, iter.base());
- assert(ex == " 1");
+ assert(ex == "122");
}
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'M');
@@ -273,11 +255,6 @@ int main()
assert(ex == "06");
}
{
- iter = f.put(output_iterator<char*>(str), ios, '*', &t, 's');
- std::string ex(str, iter.base());
-// assert(ex == "1241283786"); depends on time zone
- }
- {
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'T');
std::string ex(str, iter.base());
assert(ex == "13:03:06");
@@ -290,7 +267,7 @@ int main()
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'U');
std::string ex(str, iter.base());
- assert(ex == "00");
+ assert(ex == "17");
}
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'u');
@@ -300,17 +277,12 @@ int main()
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'V');
std::string ex(str, iter.base());
- assert(ex == "52");
- }
- {
- iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'v');
- std::string ex(str, iter.base());
- assert(ex == " 2-May-2009");
+ assert(ex == "18");
}
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'W');
std::string ex(str, iter.base());
- assert(ex == "00");
+ assert(ex == "17");
}
{
iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'w');
@@ -357,14 +329,4 @@ int main()
std::string ex(str, iter.base());
assert(ex == "%");
}
- {
- iter = f.put(output_iterator<char*>(str), ios, '*', &t, '%', 'J');
- std::string ex(str, iter.base());
- assert(ex == "J%");
- }
- {
- iter = f.put(output_iterator<char*>(str), ios, '*', &t, 'J');
- std::string ex(str, iter.base());
- assert(ex == "J");
- }
}
OpenPOWER on IntegriCloud