diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 5c7a8060dac7be6cd95f9b6df47166f728ef6236..8f18f5cc1bdfb608460dadce5e726456b9144ff7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,62 @@ +2006-01-05 Paolo Carlini <pcarlini@suse.de> + + * testsuite/testsuite_hooks.h (test_tm(unsigned)): New. + * testsuite/testsuite_hooks.cc (test_tm(unsigned)): Define. + * testsuite/22_locale/time_put/put/wchar_t/10.cc: Use it. + * testsuite/22_locale/time_put/put/wchar_t/1.cc: Likewise. + * testsuite/22_locale/time_put/put/wchar_t/2.cc: Likewise. + * testsuite/22_locale/time_put/put/wchar_t/3.cc: Likewise. + * testsuite/22_locale/time_put/put/wchar_t/4.cc: Likewise. + * testsuite/22_locale/time_put/put/wchar_t/5.cc: Likewise. + * testsuite/22_locale/time_put/put/wchar_t/6.cc: Likewise. + * testsuite/22_locale/time_put/put/wchar_t/7.cc: Likewise. + * testsuite/22_locale/time_put/put/wchar_t/8.cc: Likewise. + * testsuite/22_locale/time_put/put/wchar_t/9.cc: Likewise. + * testsuite/22_locale/time_put/put/wchar_t/17038.cc: Likewise. + * testsuite/22_locale/time_put/put/char/10.cc: Likewise. + * testsuite/22_locale/time_put/put/char/1.cc: Likewise. + * testsuite/22_locale/time_put/put/char/2.cc: Likewise. + * testsuite/22_locale/time_put/put/char/3.cc: Likewise. + * testsuite/22_locale/time_put/put/char/4.cc: Likewise. + * testsuite/22_locale/time_put/put/char/5.cc: Likewise. + * testsuite/22_locale/time_put/put/char/6.cc: Likewise. + * testsuite/22_locale/time_put/put/char/7.cc: Likewise. + * testsuite/22_locale/time_put/put/char/8.cc: Likewise. + * testsuite/22_locale/time_put/put/char/9.cc: Likewise. + * testsuite/22_locale/time_put/put/char/17038.cc: Likewise. + * testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Likewise. + * testsuite/22_locale/time_get/get_year/wchar_t/3.cc: Likewise. + * testsuite/22_locale/time_get/get_year/char/1.cc: Likewise. + * testsuite/22_locale/time_get/get_year/char/3.cc: Likewise. + * testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Likewise. + * testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Likewise. + * testsuite/22_locale/time_get/get_monthname/char/1.cc: Likewise. + * testsuite/22_locale/time_get/get_monthname/char/2.cc: Likewise. + * testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Likewise. + * testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Likewise. + * testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc: Likewise. + * testsuite/22_locale/time_get/get_weekday/char/1.cc: Likewise. + * testsuite/22_locale/time_get/get_weekday/char/2.cc: Likewise. + * testsuite/22_locale/time_get/get_weekday/char/3.cc: Likewise. + * testsuite/22_locale/time_get/get_date/wchar_t/12750.cc: Likewise. + * testsuite/22_locale/time_get/get_date/wchar_t/12750.cc: Likewise. + * testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Likewise. + * testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Likewise. + * testsuite/22_locale/time_get/get_date/wchar_t/3.cc: Likewise. + * testsuite/22_locale/time_get/get_date/char/12750.cc: Likewise. + * testsuite/22_locale/time_get/get_date/char/12750.cc: Likewise. + * testsuite/22_locale/time_get/get_date/char/1.cc: Likewise. + * testsuite/22_locale/time_get/get_date/char/2.cc: Likewise. + * testsuite/22_locale/time_get/get_date/char/3.cc: Likewise. + * testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Likewise. + * testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Likewise. + * testsuite/22_locale/time_get/get_time/wchar_t/3.cc: Likewise. + * testsuite/22_locale/time_get/get_time/wchar_t/4.cc: Likewise. + * testsuite/22_locale/time_get/get_time/char/1.cc: Likewise. + * testsuite/22_locale/time_get/get_time/char/2.cc: Likewise. + * testsuite/22_locale/time_get/get_time/char/3.cc: Likewise. + * testsuite/22_locale/time_get/get_time/char/4.cc: Likewise. + 2006-01-04 Paolo Carlini <pcarlini@suse.de> * include/ext/sso_string_base.h (__sso_string_base<>::_M_dataplus): diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc index 73f533cf5542ff85473aca9b7ade3cd01586c8f4..f1d69fc998a14026ce3ae8ad455307be791626a1 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // iter_type // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12750.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12750.cc index b5e1a244ea2e64d98ae65e93b397061647820c89..91306d7273e4f0c97dc4c26f7f21e0748c944f31 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12750.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/12750.cc @@ -2,7 +2,7 @@ // 2003-10-27 Paolo Carlini <pcarlini@suse.de> -// Copyright (C) 2003, 2005 Free Software Foundation +// Copyright (C) 2003, 2004, 2005, 2006 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,8 +47,8 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday01 = { 0, 0, 12, 2, 9, 103, 4, 274, -1 }; - const tm time_bday02 = { 0, 0, 12, 26, 9, 103, 0, 298, -1 }; + const tm time_bday01 = __gnu_test::test_tm(2); + const tm time_bday02 = __gnu_test::test_tm(3); // inspection of named locales, is_IS iss.imbue(loc_is); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc index c1b8fae91c91468ed403d845efa7917d16f08ea8..2fea15c1ac1950a7842bb3187ef91e696d929cb7 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc @@ -2,7 +2,7 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -52,7 +52,7 @@ void test02() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // iter_type // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc index fee8ced154391a8a996ca889a9c71a5b18851e92..2fbe75648e9976c7d4b3a1c1ff7bb5d49675209a 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/3.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -38,7 +38,7 @@ void test03() const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; + const tm time_sanity = __gnu_test::test_tm(1); tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc index 61b079d4e0a24d5be3f7529b5a6a24acd65f4461..cfe003abcac8262ed808fa8cf50d4c0b7daf0c66 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -48,7 +48,7 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // iter_type // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12750.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12750.cc index 33014545375c2c228988d8d3b995dcb6c5989084..ad8c6ef2be7fdbc9f749a47829578e520855817b 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12750.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/12750.cc @@ -2,7 +2,7 @@ // 2003-10-27 Paolo Carlini <pcarlini@suse.de> -// Copyright (C) 2003, 2005 Free Software Foundation +// Copyright (C) 2003, 2004, 2005, 2006 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,8 +47,8 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday01 = { 0, 0, 12, 2, 9, 103, 4, 274, -1 }; - const tm time_bday02 = { 0, 0, 12, 26, 9, 103, 0, 298, -1 }; + const tm time_bday01 = __gnu_test::test_tm(2); + const tm time_bday02 = __gnu_test::test_tm(3); // inspection of named locales, is_IS iss.imbue(loc_is); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc index a506dafc315f33370f5df1522d5fc66be1ccff21..87cb1d8fff5122723579f2c6940da8a995f0108b 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc @@ -2,7 +2,7 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -52,7 +52,7 @@ void test02() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // iter_type // get_date(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc index c4bd129ecce9942aa0de26a7f938407e0569c9d9..2b389268c09407fb3aaedc4936cb827616aaf3a2 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/3.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -38,7 +38,7 @@ void test03() const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; + const tm time_sanity = __gnu_test::test_tm(1); tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc index 678bee3039dd73d40b683f4df75daee3479c5e37..9ac63d2ae1cfb9bedca7a6a2710808a59ed25bae 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -38,7 +38,7 @@ void test01() locale loc_c = locale::classic(); // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // iter_type // get_monthname(iter_type, iter_type, ios_base&, diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc index 727f6a89b06fb493ec164553e4ed5e850aa24e35..f9240e7b3a42b40e7ff5dda60fb0c0e447896476 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc @@ -2,7 +2,7 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2005, 2006 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 @@ -40,7 +40,7 @@ void test02() VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_de ); - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); const string empty; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc index 94c2f90a1b8346c0c2a6d199b35eef25b9106d8c..0cb1d03024cc5d154a5a4b85113d6244c9b7c1c0 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -38,7 +38,7 @@ void test01() locale loc_c = locale::classic(); // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // iter_type // get_monthname(iter_type, iter_type, ios_base&, diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc index 08a93658f3767aae225e1925a066ff07c24e1f17..3fc422e18d2db8c15d987e8cecf147cc6e0d6ec8 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc @@ -2,7 +2,7 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -40,7 +40,7 @@ void test02() VERIFY( loc_hk != loc_c ); VERIFY( loc_hk != loc_de ); - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); const wstring empty; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc index 9aa45997a8621fe07c0a64412cc35ab073295549..8b55d0c6db4768ca7d0a7c172988d53bca4a732c 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc @@ -2,7 +2,7 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -50,7 +50,7 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // 2 // iter_type diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc index 753913156060dc5c27d3dc26f77263c0b7bb02a4..ed0ea7acfd0507d29ba37c95c03e8a03575a570d 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc @@ -2,7 +2,7 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -39,7 +39,7 @@ void test02() VERIFY( loc_hk != loc_c ); const string empty; - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // create an ostream-derived object, cache the time_get facet iterator_type end; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc index 1599278b85bbabea3e5d108afda5bb6df6e78b79..ed6abcb9bce2429fbfddd4dc3c236ffe753abadf 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/3.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -38,7 +38,7 @@ void test03() const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; + const tm time_sanity = __gnu_test::test_tm(1); tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/4.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/4.cc index e49a6206524e960d798b7bbf2301e9ef4c295c75..8f43573c2bb11168fb8bdf31a6ac1f08e2c8f1a5 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/4.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/4.cc @@ -1,6 +1,6 @@ // 2004-08-29 Paolo Carlini <pcarlini@suse.de> -// Copyright (C) 2004 Free Software Foundation +// Copyright (C) 2004, 2005, 2006 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 test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 60, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(4); iss.str("12:00:60 "); iterator_type is_it01(iss); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc index 15e30339d2122f48b541dd3286671505b090ecca..547b485202ddfe2dfd8a76a2a82fbde33bde5222 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc @@ -2,7 +2,7 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -50,7 +50,7 @@ void test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // 2 // iter_type diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc index 498badba949b68eb6e797de61e213464ac513f54..cde51934571473184b3b987890a1302cb25d2f92 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc @@ -2,7 +2,7 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -39,7 +39,7 @@ void test02() VERIFY( loc_hk != loc_c ); const wstring empty; - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // create an ostream-derived object, cache the time_get facet iterator_type end; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc index e0bb444241945ac8b628695660b6c04d1c134946..bef64c4d340f769a88c774fd1fcc62aec23c4105 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/3.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -38,7 +38,7 @@ void test03() const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; + const tm time_sanity = __gnu_test::test_tm(1); tm tm1; wistringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/4.cc index 161fb193c3c85e99aec3e98a0c92b83d65641607..9ce9d805d228a62f1beef7afa4ffa90d14c5d732 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/4.cc @@ -1,6 +1,6 @@ // 2004-08-29 Paolo Carlini <pcarlini@suse.de> -// Copyright (C) 2004 Free Software Foundation +// Copyright (C) 2004, 2005, 2006 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 test01() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 60, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(4); iss.str(L"12:00:60 "); iterator_type is_it01(iss); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc index d4c260766ac08be37a4aa810ccf8062d6d79aefc..2841f1a6c9a3a7a7580238b17f12e9ab7d453156 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // iter_type // get_weekday(iter_type, iter_type, ios_base&, diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc index 23b50d63dcfa7ba9165d742d8d3bc70743001ec1..91d51a59b64d09948f6657bfd489cf70e82540d0 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc @@ -2,7 +2,7 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -52,7 +52,7 @@ void test02() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // inspection of named locales, de_DE iss.imbue(loc_de); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc index 24dcc51fb96b4fcdefe727d3ee9a8e7c8a6c13fb..cc76964395c3d346726585db06a90f054748b472 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/3.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -38,7 +38,7 @@ void test03() const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; + const tm time_sanity = __gnu_test::test_tm(1); tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc index 81e0cbd30227fd361eabc316783f69ebc7fac4d7..85248531e736c53ca235fbb222988bb198478d69 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // iter_type // get_weekday(iter_type, iter_type, ios_base&, diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc index 6857abb9799b5630b24a75bb860fc5c4cbf663be..1f7ae8bc5bdea8c8876c0c1bbf335292275002d0 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc @@ -2,7 +2,7 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -52,7 +52,7 @@ void test02() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // inspection of named locales, de_DE iss.imbue(loc_de); diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc index 942c87c8ff038d9dfceabd3a2a87a3d76639e65a..2f253f606fd7c55f9d2e1df1750edab3547e97c8 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/3.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -38,7 +38,7 @@ void test03() const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; + const tm time_sanity = __gnu_test::test_tm(1); tm tm1; wistringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc index 66e44ac5a9cd9d5ccb421ff683815d976b9f9a2c..4db4332bd81cd2a9598f79ff7efd4dddf4c8b6f4 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // iter_type // get_year(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc index 11b177f879c85037af1555968f3fb31b5d285f07..63b694df9fa59999d6e46d707664348f7b6566c8 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/3.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -38,7 +38,7 @@ void test03() const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; + const tm time_sanity = __gnu_test::test_tm(1); tm tm1; istringstream iss; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc index 0fff5d58a5823cdcfedfbd896204af7237ab7bd5..143e7e2ae58e59831f89bdbe9ff1178cf9a4e03a 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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() ios_base::iostate errorstate = good; // create "C" time objects - const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time_bday = __gnu_test::test_tm(0); // iter_type // get_year(iter_type, iter_type, ios_base&, ios_base::iostate&, tm*) const diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc index 85fd34d523a3c277c202611e4d6c885e4223a5be..7be8f173fcce60bd0eb886730df8dbf38b872860 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/3.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -38,7 +38,7 @@ void test03() const locale loc_c = locale::classic(); // Create "C" time objects - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2, 0, 0 }; + const tm time_sanity = __gnu_test::test_tm(1); tm tm1; istringstream iss; 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 2d6096c39223ab70a8ee6a9bd5e3ea14bd987aa9..3edc4f9ca8e6f8a236df348ba454eb32eba77e57 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 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -32,7 +32,7 @@ void test01() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); // basic construction locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc index 9f2223d4caefcc5c0b7334ccb5c90020041944d2..ad20ffca66f9a6de4fccb6312c0bbd93775f665b 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/10.cc @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -40,7 +40,7 @@ void test10() const locale loc_c = locale::classic(); const string x(50, 'x'); // have to have allocated string! string res; - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = __gnu_test::test_tm(1); ostringstream oss; oss.imbue(locale(loc_c, new time_put_type)); 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 bac3c910374b18b539998a2d3572eb8d9f62a1ec..f218cc1924f3c36e38c78db514dc5ef29150a784 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 Free Software Foundation +// Copyright (C) 2004, 2005, 2006 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 @@ -35,7 +35,7 @@ void test01() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); // basic construction locale loc_c = locale::classic(); 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 db91d110a7aa8d08f9bcdbd9f873910e41e52cde..487534dc135a031756fdccfcb10aa37802b4dba6 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 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -34,7 +34,7 @@ void test02() bool test __attribute__((unused)) = true; // create "C" time object - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); // basic construction and sanity check locale loc_c = locale::classic(); 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 3fd23797281a4b11c04bf4e046209ebe513a9883..72c8abce642b5049fc419e61325a51e46e307746 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 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -34,7 +34,7 @@ void test03() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); // basic construction and sanity check. locale loc_c = locale::classic(); 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 8a2ba84767901542dbc180d35fb0111b1af68ac9..f75fdbc7b3e7a5eb3b19679651d3c56e12c8fb01 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,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -34,7 +34,7 @@ void test04() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); // basic construction and sanity check locale loc_c = locale::classic(); 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 6488b0e3a5d4aa2bcc79f880d5e567df554387e3..adaf2172764c774d0f3c923f7454f40454c14b2b 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 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -33,7 +33,7 @@ void test05() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; 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 ffec0393cba94cbd6c3ae77ecda7783e6a6c80f7..cc3ac67f5191f0b2904e1727550324c53c2ceaf5 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 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -35,7 +35,7 @@ void test06() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; 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 b4c5747c7dc6cf74368b9d37b1058ab04e248fa8..7fd94725e328b8a91eb178fe81b817e85b9698ff 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 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -35,7 +35,7 @@ void test07() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; 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 4699fdbdc2dabf1f765f31da9d4209f3b78fe6c7..a5507cb27fc19fce8b163e3860405b867790b244 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 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -35,7 +35,7 @@ void test08() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc index 76f711067e1d2435b09a3d848d9ebc6eb523e2c6..d222bafa72e01612bffb3cede8de08aa6ad067c0 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/9.cc @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -40,7 +40,7 @@ void test09() const locale loc_c = locale::classic(); const string x(50, 'x'); // have to have allocated string! string res; - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = __gnu_test::test_tm(1); const char* date = "%X, %A, the second of %B, %Y"; ostringstream oss; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc index c4be6be6f6e4d1cd60759e47699b8147f624f662..1637d3fbb6d63b35e141e05ad96035468336d9ec 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -32,7 +32,7 @@ void test01() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); // basic construction locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc index c68e8ff9551444b2a247242528ebc8e68c60a562..4e793e8d582d7c1689d32d328f7db90f38f0605b 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/10.cc @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -40,7 +40,7 @@ void test10() const locale loc_c = locale::classic(); const wstring x(50, 'x'); // have to have allocated wstring! wstring res; - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = __gnu_test::test_tm(1); wostringstream oss; oss.imbue(locale(loc_c, new time_put_type)); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/17038.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/17038.cc index 3f5527cb02ba996e79714efedf8bf9812de7db04..c0a8ec07f0f9fdc41bb3d96ff37e162bbdb56a3e 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/17038.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/17038.cc @@ -2,7 +2,7 @@ // 2004-08-25 Paolo Carlini <pcarlini@suse.de> -// Copyright (C) 2004, 2005 Free Software Foundation +// Copyright (C) 2004, 2005, 2006 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 @@ -35,7 +35,7 @@ void test01() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); // basic construction locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc index e98616215ab7838be7f8c9b9b43d6af721087363..feb5ae47dcbd94e39bd60f1fdf8065185b45c6eb 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc @@ -2,7 +2,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -34,7 +34,7 @@ void test02() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); // basic construction and sanity check locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc index 83900e14bd3ec27ceb2218fe45fef7674fc89bae..4908431d10598a2a4475e2ea904633596d03d7b7 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc @@ -2,7 +2,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -34,7 +34,7 @@ void test03() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); // basic construction and sanity check locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc index bb98ecfe7321ecbb1b093bb5c1dacc44d59f78fd..6c074f38d185e285d1b2e32ea9f6634700225470 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc @@ -2,7 +2,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -34,7 +34,7 @@ void test04() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); // basic construction and sanity check locale loc_c = locale::classic(); diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc index e09382c389ea0852fdb6d54fc6d826a31b6f86d0..eef787ce2e3926c0cfe68314e4bf75b927caecc7 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -33,7 +33,7 @@ void test05() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc index 7f13c04e5c2239e02af170d92b4d19c1365cc618..d527399d65d25da18173f3fd200dc3f40262bec5 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc @@ -2,7 +2,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -35,7 +35,7 @@ void test06() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc index 31c7b9688986238244b2a75b70f89f61dda725fa..299a20aa445b98447a5d6734f02b94424c9cb5ff 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc @@ -2,7 +2,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -35,7 +35,7 @@ void test07() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc index 4e0da84d57a8941df52fc0fdeb251e980d57825d..5573a896000dd1d2d33b9f07a5cbca330c5e0c59 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc @@ -2,7 +2,7 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -35,7 +35,7 @@ void test08() bool test __attribute__((unused)) = true; // create "C" time objects - tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; + const tm time1 = __gnu_test::test_tm(0); const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc index a421835e472dfde79366aebcb6b5b80afc52a532..951659ab1f6f4581bb43fd167260d3dd741a28c0 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/9.cc @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik <bkoz@redhat.com> -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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 @@ -40,7 +40,7 @@ void test09() const locale loc_c = locale::classic(); const wstring x(50, L'x'); // have to have allocated wstring! wstring res; - const tm time_sanity = { 0, 0, 12, 26, 5, 97, 2 }; + const tm time_sanity = __gnu_test::test_tm(1); const wchar_t* date = L"%X, %A, the second of %B, %Y"; wostringstream oss; diff --git a/libstdc++-v3/testsuite/testsuite_hooks.cc b/libstdc++-v3/testsuite/testsuite_hooks.cc index 8d3d5309e270a2e1d9dd83733c50eb98afbbcad9..35117fa000f5bc282820e18dc89ea0f79db3ecf0 100644 --- a/libstdc++-v3/testsuite/testsuite_hooks.cc +++ b/libstdc++-v3/testsuite/testsuite_hooks.cc @@ -302,4 +302,27 @@ namespace __gnu_test std::__throw_runtime_error("could not wait for semaphore"); #endif } + + // For use in 22_locale/time_get and time_put. + tm + test_tm(unsigned index) + { + const int data[5][9] = { { 0, 0, 12, 4, 3, 71, 0, 93, 0 }, + { 0, 0, 12, 26, 5, 97, 2, 0, 0 }, + { 0, 0, 12, 2, 9, 103, 4, 274, -1 }, + { 0, 0, 12, 26, 9, 103, 0, 298, -1 }, + { 60, 0, 12, 4, 3, 71, 0, 93, 0 } }; + + static tm tmp; + tmp.tm_sec = data[index][0]; + tmp.tm_min = data[index][1]; + tmp.tm_hour = data[index][2]; + tmp.tm_mday = data[index][3]; + tmp.tm_mon = data[index][4]; + tmp.tm_year = data[index][5]; + tmp.tm_wday = data[index][6]; + tmp.tm_yday = data[index][7]; + tmp.tm_isdst = data[index][8]; + return tmp; + } }; // namespace __gnu_test diff --git a/libstdc++-v3/testsuite/testsuite_hooks.h b/libstdc++-v3/testsuite/testsuite_hooks.h index 38b80630fc232db1172ca68b1b13037e8fe14bde..ae55f294975c5122be93e2c41f7929024679f483 100644 --- a/libstdc++-v3/testsuite/testsuite_hooks.h +++ b/libstdc++-v3/testsuite/testsuite_hooks.h @@ -385,6 +385,10 @@ namespace __gnu_test pid_t pid_; }; + + // For use in 22_locale/time_get and time_put. + tm test_tm(unsigned); + } // namespace __gnu_test #endif // _GLIBCXX_TESTSUITE_HOOKS_H