diff options
Diffstat (limited to 'libstdc++-v3/testsuite/22_locale/time_put/put/char')
11 files changed, 51 insertions, 54 deletions
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc index 8fed3437a57..32388cc6f0b 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 // Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -48,27 +48,27 @@ void test01() // put(iter_type s, ios_base& str, char_type fill, const tm* t, // char format, char modifier = 0) const; oss.str(empty); - iterator_type os_it01 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); string result1 = oss.str(); VERIFY( result1 == "Sun" ); oss.str(empty); - iterator_type os_it21 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); string result21 = oss.str(); // "04/04/71" VERIFY( result21 == "04/04/71" ); oss.str(empty); - iterator_type os_it22 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); string result22 = oss.str(); // "12:00:00" VERIFY( result22 == "12:00:00" ); oss.str(empty); - iterator_type os_it31 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); string result31 = oss.str(); // "04/04/71" VERIFY( result31 == "04/04/71" ); oss.str(empty); - iterator_type os_it32 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); string result32 = oss.str(); // "12:00:00" VERIFY( result32 == "12:00:00" ); } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_1.cc index 7de5471495f..3c6ad92e483 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_1.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2003, 2009 Free Software Foundation +// Copyright (C) 2003, 2009, 2010 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -47,7 +47,7 @@ void test01() bool test __attribute__((unused)) = true; ostringstream stream; - time_t tt = time(NULL); + time_t tt = time(0); const char* fmt = "%c"; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_3.cc index 54d4cde7cef..3d19d36c20b 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/12439_3.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2003, 2009 Free Software Foundation +// Copyright (C) 2003, 2009, 2010 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -46,7 +46,7 @@ void test03() bool test __attribute__((unused)) = true; ostringstream stream; - time_t tt = time(NULL); + time_t tt = time(0); const char* fmt = "%c"; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/17038.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/17038.cc index 318c05dc2d3..77f2972ca6e 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/17038.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/17038.cc @@ -2,7 +2,7 @@ // 2004-08-25 Paolo Carlini <pcarlini@suse.de> -// Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation +// Copyright (C) 2004, 2005, 2006, 2009, 2010 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -47,7 +47,7 @@ void test01() const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); - iterator_type os_it01 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'c'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'c'); string result1 = oss.str(); char time_buffer[128]; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc index 7c65ad9985b..255636cbd2c 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc @@ -2,7 +2,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 // Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -47,27 +47,27 @@ void test02() oss.imbue(loc_de); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); - iterator_type os_it02 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); string result2 = oss.str(); VERIFY( result2 == "Son" || result2 == "So" ); oss.str(empty); // "%d.%m.%Y" - iterator_type os_it23 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); string result23 = oss.str(); // "04.04.1971" VERIFY( result23 == "04.04.1971" ); oss.str(empty); // "%T" - iterator_type os_it24 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); string result24 = oss.str(); // "12:00:00" VERIFY( result24 == "12:00:00" ); oss.str(empty); - iterator_type os_it33 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); string result33 = oss.str(); // "04.04.1971" VERIFY( result33 == "04.04.1971" ); oss.str(empty); - iterator_type os_it34 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); string result34 = oss.str(); // "12:00:00" VERIFY( result34 == "12:00:00" ); } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc index c71b5e46d26..6b9b330aef7 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc @@ -2,7 +2,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 // Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -47,27 +47,27 @@ void test03() oss.imbue(loc_hk); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); - iterator_type os_it03 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); string result3 = oss.str(); VERIFY( result3 == "Sun" ); oss.str(empty); // "%A, %B %d, %Y" - iterator_type os_it25 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); string result25 = oss.str(); // "Sunday, April 04, 1971" VERIFY( result25 == "Sunday, April 04, 1971" ); oss.str(empty); // "%I:%M:%S %Z" - iterator_type os_it26 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); string result26 = oss.str(); // "12:00:00 CET" or whatever timezone VERIFY( result26.find("12:00:00") != string::npos ); oss.str(empty); - iterator_type os_it35 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); string result35 = oss.str(); // "Sunday, April 04, 1971" VERIFY( result35 == "Sunday, April 04, 1971" ); oss.str(empty); - iterator_type os_it36 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); string result36 = oss.str(); // "12:00:00 CET" VERIFY( result36.find("12:00:00") != string::npos ); } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc index 196c1aa9088..21b9725c6b9 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc @@ -2,7 +2,8 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +// 2009, 2010 // Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -46,27 +47,27 @@ void test04() ostringstream oss; oss.imbue(loc_es); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); - iterator_type os_it04 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'a'); string result4 = oss.str(); VERIFY( result4 == "dom" ); oss.str(empty); // "%d/%m/%y" - iterator_type os_it27 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x'); string result27 = oss.str(); // "04/04/71" VERIFY( result27 == "04/04/71" ); oss.str(empty); // "%T" - iterator_type os_it28 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X'); string result28 = oss.str(); // "12:00:00" VERIFY( result28 == "12:00:00" ); oss.str(empty); - iterator_type os_it37 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'x', 'E'); string result37 = oss.str(); // "04/04/71" VERIFY( result37 == "04/04/71" ); oss.str(empty); - iterator_type os_it38 = tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); + tim_put.put(oss.rdbuf(), oss, '*', &time1, 'X', 'E'); string result38 = oss.str(); // "12:00:00" VERIFY( result38 == "12:00:00" ); } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc index 2f9c6a6bc64..96ce947c2af 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -48,13 +48,12 @@ void test05() // 2 oss.str(empty); - iterator_type os_it05 = tim_put.put(oss.rdbuf(), oss, '*', &time1, - date, date + traits::length(date)); + tim_put.put(oss.rdbuf(), oss, '*', &time1, + date, date + traits::length(date)); string result5 = oss.str(); VERIFY( result5 == "Sunday, the second of April"); - iterator_type os_it06 = tim_put.put(oss.rdbuf(), oss, '*', &time1, - date_ex, - date_ex + traits::length(date_ex)); + tim_put.put(oss.rdbuf(), oss, '*', &time1, + date_ex, date_ex + traits::length(date_ex)); string result6 = oss.str(); VERIFY( result6 != result5 ); } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc index ff3938cc9e4..9e144ffcb03 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc @@ -2,7 +2,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -50,13 +50,12 @@ void test06() oss.imbue(loc_de); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); - iterator_type os_it07 = tim_put.put(oss.rdbuf(), oss, '*', &time1, - date, date + traits::length(date)); + tim_put.put(oss.rdbuf(), oss, '*', &time1, + date, date + traits::length(date)); string result7 = oss.str(); VERIFY( result7 == "Sonntag, the second of April"); - iterator_type os_it08 = tim_put.put(oss.rdbuf(), oss, '*', &time1, - date_ex, - date_ex + traits::length(date_ex)); + tim_put.put(oss.rdbuf(), oss, '*', &time1, + date_ex, date_ex + traits::length(date_ex)); string result8 = oss.str(); VERIFY( result8 != result7 ); } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc index 93b139d95d1..67f1aa580f6 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc @@ -2,7 +2,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -50,13 +50,12 @@ void test07() oss.imbue(loc_hk); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); - iterator_type os_it09 = tim_put.put(oss.rdbuf(), oss, '*', &time1, - date, date + traits::length(date)); + tim_put.put(oss.rdbuf(), oss, '*', &time1, + date, date + traits::length(date)); string result9 = oss.str(); VERIFY( result9 == "Sunday, the second of April"); - iterator_type os_it10 = tim_put.put(oss.rdbuf(), oss, '*', &time1, - date_ex, - date_ex + traits::length(date_ex)); + tim_put.put(oss.rdbuf(), oss, '*', &time1, + date_ex, date_ex + traits::length(date_ex)); string result10 = oss.str(); VERIFY( result10 != result9 ); } diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc index 2834954616a..c3fc4d83acd 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc @@ -2,7 +2,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 // Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free @@ -49,13 +49,12 @@ void test08() ostringstream oss; oss.imbue(loc_fr); const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc()); - iterator_type os_it11 = tim_put.put(oss.rdbuf(), oss, '*', &time1, - date, date + traits::length(date)); + tim_put.put(oss.rdbuf(), oss, '*', &time1, + date, date + traits::length(date)); string result11 = oss.str(); VERIFY( result11 == "dimanche, the second of avril"); - iterator_type os_it12 = tim_put.put(oss.rdbuf(), oss, '*', &time1, - date_ex, - date_ex + traits::length(date_ex)); + tim_put.put(oss.rdbuf(), oss, '*', &time1, + date_ex, date_ex + traits::length(date_ex)); string result12 = oss.str(); VERIFY( result12 != result11 ); } |