+2004-04-07 Paolo Carlini <pcarlini@suse.de>
+
+ * config/locale/generic/time_members.cc
+ (__timepunct<char>::_M_initialize_timepunct,
+ __timepunct<wchar_t>::_M_initialize_timepunct): the correct
+ _M_amonth07 in the "C" locale is "Jul" and L"Jul", respectively.
+ * config/locale/gnu/time_members.cc
+ (__timepunct<char>::_M_initialize_timepunct,
+ __timepunct<wchar_t>::_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 <pcarlini@suse.de>
* config/locale/gnu/monetary_members.cc
// 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
_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";
_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";
// 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
_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";
_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";
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
typedef time_base::dateorder dateorder;
typedef istreambuf_iterator<char> 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;
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
typedef time_base::dateorder dateorder;
typedef istreambuf_iterator<wchar_t> 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;
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
void test01()
{
using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<char> iterator_type;
-
bool test __attribute__((unused)) = true;
- // basic construction and sanity checks.
+ typedef istreambuf_iterator<char> 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;
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
void test02()
{
using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<char> iterator_type;
-
bool test __attribute__((unused)) = true;
+ typedef istreambuf_iterator<char> 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;
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
void test01()
{
using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<wchar_t> iterator_type;
-
bool test __attribute__((unused)) = true;
- // basic construction and sanity checks.
+ typedef istreambuf_iterator<wchar_t> 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;
void test02()
{
using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<wchar_t> iterator_type;
-
bool test __attribute__((unused)) = true;
+ typedef istreambuf_iterator<wchar_t> 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;
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
void test01()
{
using namespace std;
- typedef time_base::dateorder dateorder;
+ bool test __attribute__((unused)) = true;
+
typedef istreambuf_iterator<char> 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 };
void test02()
{
using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<char> iterator_type;
-
bool test __attribute__((unused)) = true;
+ typedef istreambuf_iterator<char> 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 };
--- /dev/null
+// 2004-04-07 Paolo Carlini <pcarlini@suse.de>
+
+// 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 <locale>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ using namespace std;
+ bool test __attribute__((unused)) = true;
+
+ typedef istreambuf_iterator<char> 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<char>& tim_get =
+ use_facet<time_get<char> >(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;
+}
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
void test01()
{
using namespace std;
- typedef time_base::dateorder dateorder;
+ bool test __attribute__((unused)) = true;
+
typedef istreambuf_iterator<wchar_t> 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 };
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
void test02()
{
using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<wchar_t> iterator_type;
-
bool test __attribute__((unused)) = true;
+ typedef istreambuf_iterator<wchar_t> 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 };
--- /dev/null
+// 2004-04-07 Paolo Carlini <pcarlini@suse.de>
+
+// 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 <locale>
+#include <sstream>
+#include <testsuite_hooks.h>
+
+void test01()
+{
+ using namespace std;
+ bool test __attribute__((unused)) = true;
+
+ typedef istreambuf_iterator<wchar_t> 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<wchar_t>& tim_get =
+ use_facet<time_get<wchar_t> >(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;
+}
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
{
using namespace std;
bool test __attribute__((unused)) = true;
- typedef time_base::dateorder dateorder;
+
typedef istreambuf_iterator<char> 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;
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
{
using namespace std;
bool test __attribute__((unused)) = true;
- typedef time_base::dateorder dateorder;
+
typedef istreambuf_iterator<char> 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 };
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
{
using namespace std;
bool test __attribute__((unused)) = true;
- typedef time_base::dateorder dateorder;
+
typedef istreambuf_iterator<wchar_t> 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;
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
{
using namespace std;
bool test __attribute__((unused)) = true;
- typedef time_base::dateorder dateorder;
+
typedef istreambuf_iterator<wchar_t> 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 };
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
void test01()
{
using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<char> iterator_type;
-
bool test __attribute__((unused)) = true;
- // basic construction and sanity checks.
+ typedef istreambuf_iterator<char> 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;
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
void test02()
{
- using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<char> iterator_type;
-
+ using namespace std;
bool test __attribute__((unused)) = true;
+ typedef istreambuf_iterator<char> 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;
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
void test01()
{
using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<wchar_t> iterator_type;
-
bool test __attribute__((unused)) = true;
- // basic construction and sanity checks.
+ typedef istreambuf_iterator<wchar_t> 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;
void test02()
{
- using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<wchar_t> iterator_type;
-
+ using namespace std;
bool test __attribute__((unused)) = true;
+ typedef istreambuf_iterator<wchar_t> 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;
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
void test01()
{
using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<char> iterator_type;
-
bool test __attribute__((unused)) = true;
- // basic construction and sanity checks.
+ typedef istreambuf_iterator<char> 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;
// 2001-09-21 Benjamin Kosnik <bkoz@redhat.com>
-// 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
void test01()
{
using namespace std;
- typedef time_base::dateorder dateorder;
- typedef istreambuf_iterator<wchar_t> iterator_type;
-
bool test __attribute__((unused)) = true;
- // basic construction and sanity checks.
+ typedef istreambuf_iterator<wchar_t> 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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
// 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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
// 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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
// 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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
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<char>& tim_put = use_facet<time_put<char> >(oss.getloc());
+ const time_put<char>& tim_put = use_facet<time_put<char> >(oss.getloc());
// 2
oss.str(empty);
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
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;
/*
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.
time_put<charT,OutputIterator> 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
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
// 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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
// 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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
// 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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
// 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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
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;
// 2001-09-17 Benjamin Kosnik <bkoz@redhat.com>
-// 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
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;