Debian Codegraph @

libstdc++-v3/testsuite/std/time/month_day_last/io.cc

raw
1 // { dg-do run { target c++20 } }
2 // { dg-require-namedlocale "fr_FR.ISO8859-15" }
3 // { dg-timeout-factor 2 }
4
5 #include <chrono>
6 #include <sstream>
7 #include <testsuite_hooks.h>
8
9 void
10 test_ostream()
11 {
12 using std::ostringstream;
13 using namespace std::chrono;
14
15 ostringstream ss;
16 ss << January/last << ' ' << February/last << ' ' << March/last;
17 VERIFY( ss.str() == "Jan/last Feb/last Mar/last" );
18
19 ss.str("");
20 ss.imbue(std::locale(ISO_8859(15,fr_FR)));
21 ss << July/last;
22 VERIFY( ss.str() == "juil./last" );
23 }
24
25 int main()
26 {
27 test_ostream();
28 // TODO: test_format();
29 // TODO: test_parse();
30 }