summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-21 11:56:46 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-21 11:56:46 +0000
commit00f780822f234fc161b9003478ed8953b3fe1241 (patch)
tree0f109c84165d9305377b78f7ef3d125ac205acef /libstdc++-v3
parentee5b281c7501b736a5719b9d23d6f077d5bdc41f (diff)
downloadgcc-00f780822f234fc161b9003478ed8953b3fe1241.tar.gz
2004-08-21 Paolo Carlini <pcarlini@suse.de>
* testsuite/22_locale/money_put/put/wchar_t/1.cc: Use proper wchar_t type for the fill argument; minor formatting tweaks. * testsuite/22_locale/money_put/put/wchar_t/12971.cc: Likewise. * testsuite/22_locale/money_put/put/wchar_t/2.cc: Likewise. * testsuite/22_locale/money_put/put/wchar_t/3.cc: Likewise. * testsuite/22_locale/money_put/put/wchar_t/4.cc: Likewise. * testsuite/22_locale/money_put/put/wchar_t/5.cc: Likewise. * testsuite/22_locale/money_put/put/wchar_t/6.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86362 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog11
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc27
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/12971.cc5
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc29
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc19
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc6
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc10
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc8
8 files changed, 66 insertions, 49 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 44f5ccb1ad6..40ef639b07c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,16 @@
2004-08-21 Paolo Carlini <pcarlini@suse.de>
+ * testsuite/22_locale/money_put/put/wchar_t/1.cc: Use proper
+ wchar_t type for the fill argument; minor formatting tweaks.
+ * testsuite/22_locale/money_put/put/wchar_t/12971.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/2.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/3.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/4.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/5.cc: Likewise.
+ * testsuite/22_locale/money_put/put/wchar_t/6.cc: Likewise.
+
+2004-08-21 Paolo Carlini <pcarlini@suse.de>
+
* include/bits/basic_ios.tcc (basic_ios<>::copyfmt): Don't deal
with _M_word != _M_local_word two times, redundantly.
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
index 9518d16f37a..76d0cdd556f 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
@@ -49,16 +49,17 @@ void test01()
// cache the money_put facet
wostringstream oss;
oss.imbue(loc_de);
- const money_put<wchar_t>& mon_put = use_facet<money_put<wchar_t> >(oss.getloc());
+ const money_put<wchar_t>& mon_put =
+ use_facet<money_put<wchar_t> >(oss.getloc());
- iterator_type os_it01 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
+ iterator_type os_it01 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits1);
wstring result1 = oss.str();
- VERIFY( result1 == L"7.200.000.000,00 ");
+ VERIFY( result1 == L"7.200.000.000,00 " );
oss.str(empty);
- iterator_type os_it02 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
+ iterator_type os_it02 = mon_put.put(oss.rdbuf(), false, oss, L' ', digits1);
wstring result2 = oss.str();
- VERIFY( result2 == L"7.200.000.000,00 ");
+ VERIFY( result2 == L"7.200.000.000,00 " );
// intl and non-intl versions should be the same.
VERIFY( result1 == result2 );
@@ -67,14 +68,14 @@ void test01()
oss.setf(ios_base::showbase);
oss.str(empty);
- iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
+ iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits1);
wstring result3 = oss.str();
- VERIFY( result3 == L"7.200.000.000,00 EUR ");
+ VERIFY( result3 == L"7.200.000.000,00 EUR " );
oss.str(empty);
- iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
+ iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, L' ', digits1);
wstring result4 = oss.str();
- VERIFY( result4 == L"7.200.000.000,00 \x20ac");
+ VERIFY( result4 == L"7.200.000.000,00 \x20ac" );
// intl and non-intl versions should be different.
VERIFY( result3 != result4 );
@@ -87,16 +88,16 @@ void test01()
// test various fill strategies
oss.str(empty);
oss.width(20);
- iterator_type os_it10 = mon_put.put(oss.rdbuf(), true, oss, '*', digits2);
+ iterator_type os_it10 = mon_put.put(oss.rdbuf(), true, oss, L'*', digits2);
wstring result10 = oss.str();
- VERIFY( result10 == L"***************-,01*");
+ VERIFY( result10 == L"***************-,01*" );
oss.str(empty);
oss.width(20);
oss.setf(ios_base::internal);
- iterator_type os_it11 = mon_put.put(oss.rdbuf(), true, oss, '*', digits2);
+ iterator_type os_it11 = mon_put.put(oss.rdbuf(), true, oss, L'*', digits2);
wstring result11 = oss.str();
- VERIFY( result11 == L"-,01****************");
+ VERIFY( result11 == L"-,01****************" );
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/12971.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/12971.cc
index 1bc93e34898..9af992a6474 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/12971.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/12971.cc
@@ -1,6 +1,6 @@
// 2003-11-09 Paolo Carlini <pcarlini@suse.de>
-// Copyright (C) 2003 Free Software Foundation
+// Copyright (C) 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
@@ -36,7 +36,8 @@ void test01()
// cache the money_put facet
wostringstream oss;
- const money_put<wchar_t>& mon_put = use_facet<money_put<wchar_t> >(oss.getloc());
+ const money_put<wchar_t>& mon_put =
+ use_facet<money_put<wchar_t> >(oss.getloc());
iterator_type os_it01 = mon_put.put(oss.rdbuf(), true, oss, L' ', amount);
wstring result = oss.str();
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
index 312a5051989..4f6148bcccc 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
@@ -55,45 +55,48 @@ void test02()
// cache the money_put facet
wostringstream oss;
oss.imbue(loc_hk);
- const money_put<wchar_t>& mon_put = use_facet<money_put<wchar_t> >(oss.getloc());
+ const money_put<wchar_t>& mon_put =
+ use_facet<money_put<wchar_t> >(oss.getloc());
// now try with showbase, to get currency symbol in format
oss.setf(ios_base::showbase);
// test sign of more than one digit, say hong kong.
oss.str(empty);
- iterator_type os_it05 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
+ iterator_type os_it05 = mon_put.put(oss.rdbuf(), false, oss, L' ', digits1);
wstring result5 = oss.str();
- VERIFY( result5 == L"HK$7,200,000,000.00");
+ VERIFY( result5 == L"HK$7,200,000,000.00" );
oss.str(empty);
- iterator_type os_it06 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits2);
+ iterator_type os_it06 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits2);
wstring result6 = oss.str();
- VERIFY( result6 == L"(HKD 100,000,000,000.00)");
+ VERIFY( result6 == L"(HKD 100,000,000,000.00)" );
// test one-digit formats without zero padding
oss.imbue(loc_c);
oss.str(empty);
- const money_put<wchar_t>& mon_put2 = use_facet<money_put<wchar_t> >(oss.getloc());
- iterator_type os_it07 = mon_put2.put(oss.rdbuf(), true, oss, ' ', digits4);
+ const money_put<wchar_t>& mon_put2 =
+ use_facet<money_put<wchar_t> >(oss.getloc());
+ iterator_type os_it07 = mon_put2.put(oss.rdbuf(), true, oss, L' ', digits4);
wstring result7 = oss.str();
- VERIFY( result7 == L"1");
+ VERIFY( result7 == L"1" );
// test one-digit formats with zero padding, zero frac widths
oss.imbue(loc_hk);
oss.str(empty);
- const money_put<wchar_t>& mon_put3 = use_facet<money_put<wchar_t> >(oss.getloc());
- iterator_type os_it08 = mon_put3.put(oss.rdbuf(), true, oss, ' ', digits4);
+ const money_put<wchar_t>& mon_put3 =
+ use_facet<money_put<wchar_t> >(oss.getloc());
+ iterator_type os_it08 = mon_put3.put(oss.rdbuf(), true, oss, L' ', digits4);
wstring result8 = oss.str();
- VERIFY( result8 == L"(HKD .01)");
+ VERIFY( result8 == L"(HKD .01)" );
oss.unsetf(ios_base::showbase);
// test bunk input
oss.str(empty);
- iterator_type os_it09 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits3);
+ iterator_type os_it09 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits3);
wstring result9 = oss.str();
- VERIFY( result9 == L"");
+ VERIFY( result9 == L"" );
}
int main()
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
index 7e381d9dc48..63f16095cc1 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
@@ -46,16 +46,17 @@ void test03()
// cache the money_put facet
wostringstream oss;
oss.imbue(loc_de);
- const money_put<wchar_t>& mon_put = use_facet<money_put<wchar_t> >(oss.getloc());
+ const money_put<wchar_t>& mon_put =
+ use_facet<money_put<wchar_t> >(oss.getloc());
- iterator_type os_it01 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
+ iterator_type os_it01 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits1);
wstring result1 = oss.str();
- VERIFY( result1 == L"7.200.000.000,00 ");
+ VERIFY( result1 == L"7.200.000.000,00 " );
oss.str(empty);
- iterator_type os_it02 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
+ iterator_type os_it02 = mon_put.put(oss.rdbuf(), false, oss, L' ', digits1);
wstring result2 = oss.str();
- VERIFY( result2 == L"7.200.000.000,00 ");
+ VERIFY( result2 == L"7.200.000.000,00 " );
// intl and non-intl versions should be the same.
VERIFY( result1 == result2 );
@@ -64,14 +65,14 @@ void test03()
oss.setf(ios_base::showbase);
oss.str(empty);
- iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
+ iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, L' ', digits1);
wstring result3 = oss.str();
- VERIFY( result3 == L"7.200.000.000,00 EUR ");
+ VERIFY( result3 == L"7.200.000.000,00 EUR " );
oss.str(empty);
- iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
+ iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, L' ', digits1);
wstring result4 = oss.str();
- VERIFY( result4 == L"7.200.000.000,00 \x20ac");
+ VERIFY( result4 == L"7.200.000.000,00 \x20ac" );
// intl and non-intl versions should be different.
VERIFY( result3 != result4 );
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc
index d288dee60ab..06ed50e0c80 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/4.cc
@@ -1,6 +1,6 @@
// 2001-08-27 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
@@ -50,7 +50,7 @@ void test04()
// 01 wstring
res = x;
- iter_type ret1 = mp.put(res.begin(), false, oss, ' ', str);
+ iter_type ret1 = mp.put(res.begin(), false, oss, L' ', str);
wstring sanity1(res.begin(), ret1);
VERIFY( err == goodbit );
VERIFY( res == L"1943xxxxxxxxxxxxx" );
@@ -58,7 +58,7 @@ void test04()
// 02 long double
res = x;
- iter_type ret2 = mp.put(res.begin(), false, oss, ' ', ld);
+ iter_type ret2 = mp.put(res.begin(), false, oss, L' ', ld);
wstring sanity2(res.begin(), ret2);
VERIFY( err == goodbit );
VERIFY( res == L"1943xxxxxxxxxxxxx" );
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc
index 40b4092eb5f..bc65998e0b0 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/5.cc
@@ -1,6 +1,6 @@
// 2001-08-27 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
@@ -26,8 +26,8 @@
struct My_money_io : public std::moneypunct<wchar_t,false>
{
- char_type do_decimal_point() const { return '.'; }
- char_type do_thousands_sep() const { return ','; }
+ char_type do_decimal_point() const { return L'.'; }
+ char_type do_thousands_sep() const { return L','; }
std::string do_grouping() const { return "\003"; }
std::wstring do_negative_sign() const { return L"()"; }
@@ -53,13 +53,13 @@ void test05()
bool intl = false;
wstring val(L"-123456");
- const money_put<wchar_t,OutIt>& mp =
+ const money_put<wchar_t, OutIt>& mp =
use_facet<money_put<wchar_t, OutIt> >(loc);
wostringstream fmt;
fmt.imbue(loc);
OutIt out(fmt);
- mp.put(out,intl,fmt,'*',val);
+ mp.put(out, intl, fmt, L'*', val);
VERIFY( fmt.str() == L"*(1,234.56)" );
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc
index 255aa6e56fc..30dafd31162 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/6.cc
@@ -1,6 +1,6 @@
// 2001-08-27 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
@@ -26,7 +26,7 @@
struct My_money_io_2 : public std::moneypunct<wchar_t,false>
{
- char_type do_thousands_sep() const { return ','; }
+ char_type do_thousands_sep() const { return L','; }
std::string do_grouping() const { return "\001"; }
};
@@ -42,13 +42,13 @@ void test06()
bool intl = false;
long double val = 1.0e50L;
- const money_put<wchar_t,OutIt>& mp =
+ const money_put<wchar_t, OutIt>& mp =
use_facet<money_put<wchar_t, OutIt> >(loc);
wostringstream fmt;
fmt.imbue(loc);
OutIt out(fmt);
- mp.put(out,intl,fmt,'*',val);
+ mp.put(out, intl, fmt, L'*', val);
VERIFY( fmt.good() );
}