Change two tests to be less dependant on locales.
This patch removes the use of the "%c" specifier for getting/setting times. The semantics of this specifier differ between linux and Mac. I don't believe the use of this specifier was important to the test. The following tests now pass on linux. test/input.output/iostream.format/ext.manip/get_time.pass.cpp test/input.output/iostream.format/ext.manip/put_time.pass.cpp git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215417 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -43,7 +43,7 @@ int main()
|
||||
std::istream is(&sb);
|
||||
is.imbue(std::locale(LOCALE_en_US_UTF_8));
|
||||
std::tm t = {0};
|
||||
is >> std::get_time(&t, "%c");
|
||||
is >> std::get_time(&t, "%a %b %d %H:%M:%S %Y");
|
||||
assert(t.tm_sec == 59);
|
||||
assert(t.tm_min == 55);
|
||||
assert(t.tm_hour == 23);
|
||||
@@ -59,7 +59,7 @@ int main()
|
||||
std::wistream is(&sb);
|
||||
is.imbue(std::locale(LOCALE_en_US_UTF_8));
|
||||
std::tm t = {0};
|
||||
is >> std::get_time(&t, L"%c");
|
||||
is >> std::get_time(&t, L"%a %b %d %H:%M:%S %Y");
|
||||
assert(t.tm_sec == 59);
|
||||
assert(t.tm_min == 55);
|
||||
assert(t.tm_hour == 23);
|
||||
|
||||
Reference in New Issue
Block a user