From: Paolo Carlini Date: Wed, 7 Apr 2004 23:14:08 +0000 (+0000) Subject: time_members.cc (__timepunct::_M_initialize_timepunct, [...]): the correct... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ba98a8d81a0f323dc4fc6186d81d11b10801c1de;p=gcc.git time_members.cc (__timepunct::_M_initialize_timepunct, [...]): the correct _M_amonth07 in the "C" locale is "Jul" and L"Jul", respectively. 2004-04-07 Paolo Carlini * config/locale/generic/time_members.cc (__timepunct::_M_initialize_timepunct, __timepunct::_M_initialize_timepunct): the correct _M_amonth07 in the "C" locale is "Jul" and L"Jul", respectively. * config/locale/gnu/time_members.cc (__timepunct::_M_initialize_timepunct, __timepunct::_M_initialize_timepunct): Ditto. * testsuite/22_locale/time_get/get_monthname/char/4.cc: New. * testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc: New. * testsuite/22_locale/time_get/date_order/char/1.cc: Remove junk. * testsuite/22_locale/time_get/date_order/wchar_t/1.cc: Ditto. * testsuite/22_locale/time_get/get_date/char/1.cc: Ditto. * testsuite/22_locale/time_get/get_date/char/2.cc: Ditto. * testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Ditto. * testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Ditto. * testsuite/22_locale/time_get/get_monthname/char/1.cc: Ditto. * testsuite/22_locale/time_get/get_monthname/char/2.cc: Ditto. * testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Ditto. * testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Ditto. * testsuite/22_locale/time_get/get_time/char/1.cc: Ditto. * testsuite/22_locale/time_get/get_time/char/2.cc: Ditto. * testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Ditto. * testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Ditto. * testsuite/22_locale/time_get/get_weekday/char/1.cc: Ditto. * testsuite/22_locale/time_get/get_weekday/char/2.cc: Ditto. * testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Ditto. * testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Ditto. * testsuite/22_locale/time_get/get_year/char/1.cc: Ditto. * testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Ditto. * testsuite/22_locale/time_put/put/char/1.cc: Ditto. * testsuite/22_locale/time_put/put/char/2.cc: Ditto. * testsuite/22_locale/time_put/put/char/3.cc: Ditto. * testsuite/22_locale/time_put/put/char/4.cc: Ditto. * testsuite/22_locale/time_put/put/char/5.cc: Ditto. * testsuite/22_locale/time_put/put/char/6.cc: Ditto. * testsuite/22_locale/time_put/put/char/7.cc: Ditto. * testsuite/22_locale/time_put/put/char/8.cc: Ditto. * testsuite/22_locale/time_put/put/wchar_t/1.cc: Ditto. * testsuite/22_locale/time_put/put/wchar_t/2.cc: Ditto. * testsuite/22_locale/time_put/put/wchar_t/3.cc: Ditto. * testsuite/22_locale/time_put/put/wchar_t/4.cc: Ditto. * testsuite/22_locale/time_put/put/wchar_t/5.cc: Ditto. * testsuite/22_locale/time_put/put/wchar_t/6.cc: Ditto. * testsuite/22_locale/time_put/put/wchar_t/7.cc: Ditto. * testsuite/22_locale/time_put/put/wchar_t/8.cc: Ditto. * testsuite/22_locale/time_put/put/char/9780-1.cc: Fix typos. From-SVN: r80493 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 59aae7d0881..f8aa918d48f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,54 @@ +2004-04-07 Paolo Carlini + + * config/locale/generic/time_members.cc + (__timepunct::_M_initialize_timepunct, + __timepunct::_M_initialize_timepunct): the correct + _M_amonth07 in the "C" locale is "Jul" and L"Jul", respectively. + * config/locale/gnu/time_members.cc + (__timepunct::_M_initialize_timepunct, + __timepunct::_M_initialize_timepunct): Ditto. + * testsuite/22_locale/time_get/get_monthname/char/4.cc: New. + * testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc: New. + + * testsuite/22_locale/time_get/date_order/char/1.cc: Remove junk. + * testsuite/22_locale/time_get/date_order/wchar_t/1.cc: Ditto. + * testsuite/22_locale/time_get/get_date/char/1.cc: Ditto. + * testsuite/22_locale/time_get/get_date/char/2.cc: Ditto. + * testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Ditto. + * testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Ditto. + * testsuite/22_locale/time_get/get_monthname/char/1.cc: Ditto. + * testsuite/22_locale/time_get/get_monthname/char/2.cc: Ditto. + * testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Ditto. + * testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Ditto. + * testsuite/22_locale/time_get/get_time/char/1.cc: Ditto. + * testsuite/22_locale/time_get/get_time/char/2.cc: Ditto. + * testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Ditto. + * testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Ditto. + * testsuite/22_locale/time_get/get_weekday/char/1.cc: Ditto. + * testsuite/22_locale/time_get/get_weekday/char/2.cc: Ditto. + * testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Ditto. + * testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Ditto. + * testsuite/22_locale/time_get/get_year/char/1.cc: Ditto. + * testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Ditto. + * testsuite/22_locale/time_put/put/char/1.cc: Ditto. + * testsuite/22_locale/time_put/put/char/2.cc: Ditto. + * testsuite/22_locale/time_put/put/char/3.cc: Ditto. + * testsuite/22_locale/time_put/put/char/4.cc: Ditto. + * testsuite/22_locale/time_put/put/char/5.cc: Ditto. + * testsuite/22_locale/time_put/put/char/6.cc: Ditto. + * testsuite/22_locale/time_put/put/char/7.cc: Ditto. + * testsuite/22_locale/time_put/put/char/8.cc: Ditto. + * testsuite/22_locale/time_put/put/wchar_t/1.cc: Ditto. + * testsuite/22_locale/time_put/put/wchar_t/2.cc: Ditto. + * testsuite/22_locale/time_put/put/wchar_t/3.cc: Ditto. + * testsuite/22_locale/time_put/put/wchar_t/4.cc: Ditto. + * testsuite/22_locale/time_put/put/wchar_t/5.cc: Ditto. + * testsuite/22_locale/time_put/put/wchar_t/6.cc: Ditto. + * testsuite/22_locale/time_put/put/wchar_t/7.cc: Ditto. + * testsuite/22_locale/time_put/put/wchar_t/8.cc: Ditto. + + * testsuite/22_locale/time_put/put/char/9780-1.cc: Fix typos. + 2004-04-07 Paolo Carlini * config/locale/gnu/monetary_members.cc diff --git a/libstdc++-v3/config/locale/generic/time_members.cc b/libstdc++-v3/config/locale/generic/time_members.cc index 3574a844b5a..6e2f755de08 100644 --- a/libstdc++-v3/config/locale/generic/time_members.cc +++ b/libstdc++-v3/config/locale/generic/time_members.cc @@ -1,6 +1,6 @@ // std::time_get, std::time_put implementation, generic version -*- C++ -*- -// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. // // 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 @@ -108,7 +108,7 @@ namespace std _M_data->_M_amonth04 = "Apr"; _M_data->_M_amonth05 = "May"; _M_data->_M_amonth06 = "Jun"; - _M_data->_M_amonth07 = "July"; + _M_data->_M_amonth07 = "Jul"; _M_data->_M_amonth08 = "Aug"; _M_data->_M_amonth09 = "Sep"; _M_data->_M_amonth10 = "Oct"; @@ -187,7 +187,7 @@ namespace std _M_data->_M_amonth04 = L"Apr"; _M_data->_M_amonth05 = L"May"; _M_data->_M_amonth06 = L"Jun"; - _M_data->_M_amonth07 = L"July"; + _M_data->_M_amonth07 = L"Jul"; _M_data->_M_amonth08 = L"Aug"; _M_data->_M_amonth09 = L"Sep"; _M_data->_M_amonth10 = L"Oct"; diff --git a/libstdc++-v3/config/locale/gnu/time_members.cc b/libstdc++-v3/config/locale/gnu/time_members.cc index 62dc843dfd7..a8e96877255 100644 --- a/libstdc++-v3/config/locale/gnu/time_members.cc +++ b/libstdc++-v3/config/locale/gnu/time_members.cc @@ -1,6 +1,6 @@ // std::time_get, std::time_put implementation, GNU version -*- C++ -*- -// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. // // 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 @@ -117,7 +117,7 @@ namespace std _M_data->_M_amonth04 = "Apr"; _M_data->_M_amonth05 = "May"; _M_data->_M_amonth06 = "Jun"; - _M_data->_M_amonth07 = "July"; + _M_data->_M_amonth07 = "Jul"; _M_data->_M_amonth08 = "Aug"; _M_data->_M_amonth09 = "Sep"; _M_data->_M_amonth10 = "Oct"; @@ -265,7 +265,7 @@ namespace std _M_data->_M_amonth04 = L"Apr"; _M_data->_M_amonth05 = L"May"; _M_data->_M_amonth06 = L"Jun"; - _M_data->_M_amonth07 = L"July"; + _M_data->_M_amonth07 = L"Jul"; _M_data->_M_amonth08 = L"Aug"; _M_data->_M_amonth09 = L"Sep"; _M_data->_M_amonth10 = L"Oct"; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc index 4eb2a3149e0..85ce3cc1657 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc @@ -1,5 +1,6 @@ // 2001-09-21 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation + +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -30,17 +31,10 @@ void test01() typedef time_base::dateorder dateorder; typedef istreambuf_iterator iterator_type; - // basic construction and sanity checks. + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); - - const string empty; + + const string empty; // create an ostream-derived object, cache the time_get facet iterator_type end; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc index 3916275ae73..720fb8bb650 100644 --- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -31,15 +31,8 @@ void test01() typedef time_base::dateorder dateorder; typedef istreambuf_iterator iterator_type; - // basic construction and sanity checks. + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const string empty; 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 0aa5ddcc0fa..714c3b2f4f8 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -27,20 +27,12 @@ void test01() { using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - bool test __attribute__((unused)) = true; - // basic construction and sanity checks. + typedef istreambuf_iterator iterator_type; + + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const string empty; 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 9860b43a615..f8f28dad5b9 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 @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -27,20 +27,16 @@ void test02() { using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - bool test __attribute__((unused)) = true; + typedef istreambuf_iterator iterator_type; + // basic construction and sanity checks. locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const string empty; 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 e4b67e0778d..d724f45ed80 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -27,20 +27,12 @@ void test01() { using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - bool test __attribute__((unused)) = true; - // basic construction and sanity checks. + typedef istreambuf_iterator iterator_type; + + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const wstring empty; 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 59695724138..4ca802a68af 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 @@ -27,20 +27,16 @@ void test02() { using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - bool test __attribute__((unused)) = true; + typedef istreambuf_iterator iterator_type; + // basic construction and sanity checks. locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const wstring empty; 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 cf948c3d0d5..5d314613f9f 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -27,23 +27,15 @@ void test01() { using namespace std; - typedef time_base::dateorder dateorder; + bool test __attribute__((unused)) = true; + typedef istreambuf_iterator iterator_type; const ios_base::iostate good = ios_base::goodbit; ios_base::iostate errorstate = good; - bool test __attribute__((unused)) = true; - - // basic construction and sanity checks. + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); // create "C" time objects const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; 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 5f183b59fd5..7cd4cc6b9b6 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 @@ -27,20 +27,16 @@ void test02() { using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - bool test __attribute__((unused)) = true; + typedef istreambuf_iterator iterator_type; + // basic construction and sanity checks. locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/4.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/4.cc new file mode 100644 index 00000000000..f187307afab --- /dev/null +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/4.cc @@ -0,0 +1,59 @@ +// 2004-04-07 Paolo Carlini + +// Copyright (C) 2004 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 22.2.5.1.1 time_get members + +#include +#include +#include + +void test01() +{ + using namespace std; + bool test __attribute__((unused)) = true; + + typedef istreambuf_iterator iterator_type; + + const ios_base::iostate good = ios_base::goodbit; + ios_base::iostate errorstate = good; + + // basic construction + locale loc_c = locale::classic(); + + iterator_type end; + istringstream iss; + iss.imbue(loc_c); + const time_get& tim_get = + use_facet >(iss.getloc()); + + iss.str("Jul"); + iterator_type is_it01(iss); + tm time01; + errorstate = good; + tim_get.get_monthname(is_it01, end, iss, errorstate, &time01); + VERIFY( time01.tm_mon == 6 ); + VERIFY( errorstate == ios_base::eofbit ); +} + +int main() +{ + test01(); + return 0; +} 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 17a8075f16d..c5c51a38dee 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -27,23 +27,15 @@ void test01() { using namespace std; - typedef time_base::dateorder dateorder; + bool test __attribute__((unused)) = true; + typedef istreambuf_iterator iterator_type; const ios_base::iostate good = ios_base::goodbit; ios_base::iostate errorstate = good; - bool test __attribute__((unused)) = true; - - // basic construction and sanity checks. + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); // create "C" time objects const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; 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 af861cb7bfe..5148c40c33a 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 @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -27,20 +27,16 @@ void test02() { using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - bool test __attribute__((unused)) = true; + typedef istreambuf_iterator iterator_type; + // basic construction and sanity checks. locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc new file mode 100644 index 00000000000..dd1c393ac15 --- /dev/null +++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/4.cc @@ -0,0 +1,59 @@ +// 2004-04-07 Paolo Carlini + +// Copyright (C) 2004 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 +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 2, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING. If not, write to the Free +// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, +// USA. + +// 22.2.5.1.1 time_get members + +#include +#include +#include + +void test01() +{ + using namespace std; + bool test __attribute__((unused)) = true; + + typedef istreambuf_iterator iterator_type; + + const ios_base::iostate good = ios_base::goodbit; + ios_base::iostate errorstate = good; + + // basic construction + locale loc_c = locale::classic(); + + iterator_type end; + wistringstream iss; + iss.imbue(loc_c); + const time_get& tim_get = + use_facet >(iss.getloc()); + + iss.str(L"Jul"); + iterator_type is_it01(iss); + tm time01; + errorstate = good; + tim_get.get_monthname(is_it01, end, iss, errorstate, &time01); + VERIFY( time01.tm_mon == 6 ); + VERIFY( errorstate == ios_base::eofbit ); +} + +int main() +{ + test01(); + return 0; +} 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 c3b3bb1c015..adbc28e0997 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 @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -28,18 +28,13 @@ void test01() { using namespace std; bool test __attribute__((unused)) = true; - typedef time_base::dateorder dateorder; + typedef istreambuf_iterator iterator_type; // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); + VERIFY( loc_de != loc_c ); const string empty; 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 7341274182e..fccee272340 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 @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -28,18 +28,13 @@ void test02() { using namespace std; bool test __attribute__((unused)) = true; - typedef time_base::dateorder dateorder; + typedef istreambuf_iterator iterator_type; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const string empty; const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; 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 f8d0bc6de60..f1b1c42f7b0 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 @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -28,18 +28,13 @@ void test01() { using namespace std; bool test __attribute__((unused)) = true; - typedef time_base::dateorder dateorder; + typedef istreambuf_iterator iterator_type; // basic construction and sanity checks. locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); + VERIFY( loc_de != loc_c ); const wstring empty; 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 8c75a6fd76c..8b736d289cc 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 @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -28,18 +28,13 @@ void test02() { using namespace std; bool test __attribute__((unused)) = true; - typedef time_base::dateorder dateorder; + typedef istreambuf_iterator iterator_type; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const wstring empty; const tm time_bday = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; 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 993592158e4..85565e87853 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -27,20 +27,12 @@ void test01() { using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - bool test __attribute__((unused)) = true; - // basic construction and sanity checks. + typedef istreambuf_iterator iterator_type; + + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const string empty; 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 93151dfa324..27a37beade5 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 @@ -1,6 +1,6 @@ // 2001-09-21 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -26,21 +26,17 @@ void test02() { - using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - + using namespace std; bool test __attribute__((unused)) = true; + typedef istreambuf_iterator iterator_type; + // basic construction and sanity checks. locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const string empty; 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 782b4e70d34..67efe266847 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -27,20 +27,12 @@ void test01() { using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - bool test __attribute__((unused)) = true; - // basic construction and sanity checks. + typedef istreambuf_iterator iterator_type; + + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const wstring empty; 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 1bf98971214..ba86a67899c 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 @@ -26,21 +26,17 @@ void test02() { - using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - + using namespace std; bool test __attribute__((unused)) = true; + typedef istreambuf_iterator iterator_type; + // basic construction and sanity checks. locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const wstring empty; 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 1ae3d4ee3fc..e558cbad760 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -27,20 +27,12 @@ void test01() { using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - bool test __attribute__((unused)) = true; - // basic construction and sanity checks. + typedef istreambuf_iterator iterator_type; + + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const string empty; 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 578d18f7e04..07249303a5a 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -27,20 +27,12 @@ void test01() { using namespace std; - typedef time_base::dateorder dateorder; - typedef istreambuf_iterator iterator_type; - bool test __attribute__((unused)) = true; - // basic construction and sanity checks. + typedef istreambuf_iterator iterator_type; + + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); const wstring empty; 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 471806cea5f..a1785440128 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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,15 +34,8 @@ void test01() // create "C" time objects tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; - // basic construction and sanity checks. + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); // create an ostream-derived object, cache the time_put facet const string empty; 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 03f5b7d275f..d7dad7feedb 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -31,18 +31,13 @@ void test02() bool test __attribute__((unused)) = true; - // create "C" time objects + // create "C" time object tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); + VERIFY( loc_de != loc_c ); // create an ostream-derived object, cache the time_put facet const string empty; 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 12633742505..8124107499d 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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,15 +34,10 @@ void test03() // create "C" time objects tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; - // basic construction and sanity checks. + // basic construction and sanity check. locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); // create an ostream-derived object, cache the time_put facet const string empty; 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 3a99df30979..7640fc0ed7d 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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,15 +34,10 @@ void test04() // create "C" time objects tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); + VERIFY( loc_fr != loc_c ); // create an ostream-derived object, cache the time_put facet const string empty; 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 64ca142fa09..348ca8ff564 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -37,21 +37,14 @@ void test05() const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; - // basic construction and sanity checks. + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); // create an ostream-derived object, cache the time_put facet const string empty; ostringstream oss; oss.imbue(loc_c); - const time_put& tim_put = use_facet >(oss.getloc()); + const time_put& tim_put = use_facet >(oss.getloc()); // 2 oss.str(empty); 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 53baf21afd4..f840713eb1c 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -37,15 +37,10 @@ void test06() const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); + VERIFY( loc_de != loc_c ); // create an ostream-derived object, cache the time_put facet const string empty; 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 e8aeea2e623..799cf430ff6 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -37,16 +37,10 @@ void test07() const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; - - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); // create an ostream-derived object, cache the time_put facet const string empty; 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 b940f2aa0c4..d54380f8999 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -37,15 +37,10 @@ void test08() const char* date = "%A, the second of %B"; const char* date_ex = "%Ex"; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); + VERIFY( loc_fr != loc_c ); // create an ostream-derived object, cache the time_put facet const string empty; diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/9780-1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/9780-1.cc index bd7fe40447d..715000e9dde 100644 --- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/9780-1.cc +++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/9780-1.cc @@ -61,7 +61,7 @@ int main() /* The problems with the first approach, as above, are numerous. -1) Then locale usage and design for formatters and parers becomes +1) The locale usage and design for formatters and parsers becomes fragmented. On one side, num_put and money_put, and on the other, time_put. This inconsistency is not useful. @@ -79,7 +79,7 @@ The problems with the first approach, as above, are numerous. time_put provide date and time formatting and parsing. All specifications of member functions for time_put and time_get in the subclauses of lib.category.time only apply to the - instantiations required in Tables ?? and ?? + instantiations required in Tables 51 and 52 (lib.locale.category). Their members use their ios_base&, ios_base::iostate&, and fill arguments as described in (lib.locale.categories), and the ctype<> facet, to determine 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 9f1b11d76aa..f9d91de6d37 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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,15 +34,8 @@ void test01() // create "C" time objects tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; - // basic construction and sanity checks. + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); // create an ostream-derived object, cache the time_put facet const wstring empty; 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 d056bb3c6f0..8c85fdbd65f 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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,15 +34,10 @@ void test02() // create "C" time objects tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); + VERIFY( loc_de != loc_c ); // create an ostream-derived object, cache the time_put facet const wstring empty; 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 06d51d96297..0aae0e22f4e 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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,15 +34,10 @@ void test03() // create "C" time objects tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); // create an ostream-derived object, cache the time_put facet const wstring empty; 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 4a8b27b5adf..e65379492a9 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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,15 +34,10 @@ void test04() // create "C" time objects tm time1 = { 0, 0, 12, 4, 3, 71, 0, 93, 0 }; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); + VERIFY( loc_fr != loc_c ); // create an ostream-derived object, cache the time_put facet const wstring empty; 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 0a65f3a4d43..2cc6fd8bc66 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 -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -37,15 +37,8 @@ void test05() const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; - // basic construction and sanity checks. + // basic construction locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); // create an ostream-derived object, cache the time_put facet const wstring empty; 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 f4755bd1962..f75114fe1e1 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -37,15 +37,10 @@ void test06() const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); + VERIFY( loc_de != loc_c ); // create an ostream-derived object, cache the time_put facet const wstring empty; 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 99faf619886..6afe4fc7ba5 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -37,15 +37,10 @@ void test07() const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); locale loc_hk = __gnu_test::try_named_locale("en_HK"); - locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); // create an ostream-derived object, cache the time_put facet const wstring empty; 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 0a7ff3c4372..10e8da431f8 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 @@ -1,6 +1,6 @@ // 2001-09-17 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation +// Copyright (C) 2001, 2002, 2003, 2004 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 @@ -37,15 +37,10 @@ void test08() const wchar_t* date = L"%A, the second of %B"; const wchar_t* date_ex = L"%Ex"; - // basic construction and sanity checks. + // basic construction and sanity check locale loc_c = locale::classic(); - locale loc_hk = __gnu_test::try_named_locale("en_HK"); locale loc_fr = __gnu_test::try_named_locale("fr_FR@euro"); - locale loc_de = __gnu_test::try_named_locale("de_DE"); - VERIFY( loc_hk != loc_c ); - VERIFY( loc_hk != loc_fr ); - VERIFY( loc_hk != loc_de ); - VERIFY( loc_de != loc_fr ); + VERIFY( loc_fr != loc_c ); // create an ostream-derived object, cache the time_put facet const wstring empty;