summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-13 12:31:50 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-13 12:31:50 +0000
commite36fe88336d9a28b0e0d2a2967125cffaadeef4f (patch)
treec9ae7e00cff75d12017047ea00f63aab5deba333 /libstdc++-v3
parent8da1cc811ae24d43f2e2d071c180f5cde35c05b8 (diff)
downloadgcc-e36fe88336d9a28b0e0d2a2967125cffaadeef4f.tar.gz
2002-05-13 Paolo Carlini <pcarlini@unitus.it>
Jakub Jelinek <jakub@redhat.com> * testsuite/22_locale/money_get_members_char.cc (test01, test02, test04): Use the de_DE@euro named locale instead of de_DE to allow for an uniform behaviour with both old and Euro-era localedata; tweak some tests. * testsuite/22_locale/money_get_members_wchar_t.cc (test01, test02, test04): Likewise. * testsuite/22_locale/money_put_members_char.cc (test01, test02, test04): Likewise. * testsuite/22_locale/money_put_members_wchar_t.cc (test01, test02, test04): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53420 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog14
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get_members_char.cc16
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc16
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put_members_char.cc18
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc18
5 files changed, 48 insertions, 34 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index c8ff8db2c6d..23308e36f01 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,4 +1,18 @@
2002-05-13 Paolo Carlini <pcarlini@unitus.it>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * testsuite/22_locale/money_get_members_char.cc
+ (test01, test02, test04): Use the de_DE@euro named locale
+ instead of de_DE to allow for an uniform behaviour with
+ both old and Euro-era localedata; tweak some tests.
+ * testsuite/22_locale/money_get_members_wchar_t.cc
+ (test01, test02, test04): Likewise.
+ * testsuite/22_locale/money_put_members_char.cc
+ (test01, test02, test04): Likewise.
+ * testsuite/22_locale/money_put_members_wchar_t.cc
+ (test01, test02, test04): Likewise.
+
+2002-05-13 Paolo Carlini <pcarlini@unitus.it>
* testsuite/22_locale/codecvt_members_char_char.cc
(test03): Robustify wrt localedata.
diff --git a/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
index 4bc3e45c127..1d80e7539f7 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
@@ -41,7 +41,7 @@ void test01()
locale loc_c = locale::classic();
locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro");
- locale loc_de("de_DE");
+ locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
@@ -122,7 +122,7 @@ void test01()
// now try with showbase, to get currency symbol in format
iss.setf(ios_base::showbase);
- iss.str("7.200.000.000,00 DEM ");
+ iss.str("7.200.000.000,00 EUR ");
iterator_type is_it06(iss);
string result6;
ios_base::iostate err06 = ios_base::goodbit;
@@ -130,7 +130,7 @@ void test01()
VERIFY( result6 == digits1 );
VERIFY( err06 == ios_base::eofbit );
- iss.str("7.200.000.000,00 DEM "); // Extra space.
+ iss.str("7.200.000.000,00 EUR "); // Extra space.
iterator_type is_it07(iss);
string result7;
ios_base::iostate err07 = ios_base::goodbit;
@@ -138,7 +138,7 @@ void test01()
VERIFY( result7 == digits1 );
VERIFY( err07 == ios_base::goodbit );
- iss.str("7.200.000.000,00 DM");
+ iss.str("7.200.000.000,00 \244");
iterator_type is_it08(iss);
string result8;
ios_base::iostate err08 = ios_base::goodbit;
@@ -216,7 +216,7 @@ void test02()
locale loc_c = locale::classic();
locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro");
- locale loc_de("de_DE");
+ locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
@@ -324,12 +324,12 @@ void test04()
{
#ifdef _GLIBCPP_HAVE_SETENV
// Set the global locale to non-"C".
- std::locale loc_de("de_DE");
+ std::locale loc_de("de_DE@euro");
std::locale::global(loc_de);
- // Set LANG environment variable to de_DE.
+ // Set LANG environment variable to de_DE@euro.
const char* oldLANG = getenv("LANG");
- if (!setenv("LANG", "de_DE", 1))
+ if (!setenv("LANG", "de_DE@euro", 1))
{
test01();
test02();
diff --git a/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
index 3d2371993a0..3d95d262c70 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
@@ -42,7 +42,7 @@ void test01()
locale loc_c = locale::classic();
locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro");
- locale loc_de("de_DE");
+ locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
@@ -123,7 +123,7 @@ void test01()
// now try with showbase, to get currency symbol in format
iss.setf(ios_base::showbase);
- iss.str(L"7.200.000.000,00 DEM ");
+ iss.str(L"7.200.000.000,00 EUR ");
iterator_type is_it06(iss);
wstring result6;
ios_base::iostate err06 = ios_base::goodbit;
@@ -131,7 +131,7 @@ void test01()
VERIFY( result6 == digits1 );
VERIFY( err06 == ios_base::eofbit );
- iss.str(L"7.200.000.000,00 DEM "); // Extra space.
+ iss.str(L"7.200.000.000,00 EUR "); // Extra space.
iterator_type is_it07(iss);
wstring result7;
ios_base::iostate err07 = ios_base::goodbit;
@@ -139,7 +139,7 @@ void test01()
VERIFY( result7 == digits1 );
VERIFY( err07 == ios_base::goodbit );
- iss.str(L"7.200.000.000,00 DM");
+ iss.str(L"7.200.000.000,00 \x20ac");
iterator_type is_it08(iss);
wstring result8;
ios_base::iostate err08 = ios_base::goodbit;
@@ -218,7 +218,7 @@ void test02()
locale loc_c = locale::classic();
locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro");
- locale loc_de("de_DE");
+ locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
@@ -326,12 +326,12 @@ void test04()
{
#ifdef _GLIBCPP_HAVE_SETENV
// Set the global locale to non-"C".
- std::locale loc_de("de_DE");
+ std::locale loc_de("de_DE@euro");
std::locale::global(loc_de);
- // Set LANG environment variable to de_DE.
+ // Set LANG environment variable to de_DE@euro.
const char* oldLANG = getenv("LANG");
- if (!setenv("LANG", "de_DE", 1))
+ if (!setenv("LANG", "de_DE@euro", 1))
{
test01();
test02();
diff --git a/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
index 573893545a7..6cae3d79351 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
@@ -41,7 +41,7 @@ void test01()
locale loc_c = locale::classic();
locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro");
- locale loc_de("de_DE");
+ locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
@@ -97,12 +97,12 @@ void test01()
oss.str(empty);
iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
string result3 = oss.str();
- VERIFY( result3 == "7.200.000.000,00 DEM ");
+ VERIFY( result3 == "7.200.000.000,00 EUR ");
oss.str(empty);
iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
string result4 = oss.str();
- VERIFY( result4 == "7.200.000.000,00 DM");
+ VERIFY( result4 == "7.200.000.000,00 \244");
// intl and non-intl versions should be different.
VERIFY( result3 != result4 );
@@ -175,7 +175,7 @@ void test02()
locale loc_c = locale::classic();
locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro");
- locale loc_de("de_DE");
+ locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
@@ -228,12 +228,12 @@ void test02()
oss.str(empty);
iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
string result3 = oss.str();
- VERIFY( result3 == "7.200.000.000,00 DEM ");
+ VERIFY( result3 == "7.200.000.000,00 EUR ");
oss.str(empty);
iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
string result4 = oss.str();
- VERIFY( result4 == "7.200.000.000,00 DM");
+ VERIFY( result4 == "7.200.000.000,00 \244");
// intl and non-intl versions should be different.
VERIFY( result3 != result4 );
@@ -288,12 +288,12 @@ void test04()
{
#ifdef _GLIBCPP_HAVE_SETENV
// Set the global locale to non-"C".
- std::locale loc_de("de_DE");
+ std::locale loc_de("de_DE@euro");
std::locale::global(loc_de);
- // Set LANG environment variable to de_DE.
+ // Set LANG environment variable to de_DE@euro.
const char* oldLANG = getenv("LANG");
- if (!setenv("LANG", "de_DE", 1))
+ if (!setenv("LANG", "de_DE@euro", 1))
{
test01();
test02();
diff --git a/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
index 9143fb6f9ad..c9132516b02 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
@@ -42,7 +42,7 @@ void test01()
locale loc_c = locale::classic();
locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro");
- locale loc_de("de_DE");
+ locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
@@ -97,12 +97,12 @@ void test01()
oss.str(empty);
iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
wstring result3 = oss.str();
- VERIFY( result3 == L"7.200.000.000,00 DEM ");
+ VERIFY( result3 == L"7.200.000.000,00 EUR ");
oss.str(empty);
iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
wstring result4 = oss.str();
- VERIFY( result4 == L"7.200.000.000,00 DM");
+ VERIFY( result4 == L"7.200.000.000,00 \x20ac");
// intl and non-intl versions should be different.
VERIFY( result3 != result4 );
@@ -175,7 +175,7 @@ void test02()
locale loc_c = locale::classic();
locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro");
- locale loc_de("de_DE");
+ locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
@@ -228,12 +228,12 @@ void test02()
oss.str(empty);
iterator_type os_it03 = mon_put.put(oss.rdbuf(), true, oss, ' ', digits1);
wstring result3 = oss.str();
- VERIFY( result3 == L"7.200.000.000,00 DEM ");
+ VERIFY( result3 == L"7.200.000.000,00 EUR ");
oss.str(empty);
iterator_type os_it04 = mon_put.put(oss.rdbuf(), false, oss, ' ', digits1);
wstring result4 = oss.str();
- VERIFY( result4 == L"7.200.000.000,00 DM");
+ VERIFY( result4 == L"7.200.000.000,00 \x20ac");
// intl and non-intl versions should be different.
VERIFY( result3 != result4 );
@@ -288,12 +288,12 @@ void test04()
{
#ifdef _GLIBCPP_HAVE_SETENV
// Set the global locale to non-"C".
- std::locale loc_de("de_DE");
+ std::locale loc_de("de_DE@euro");
std::locale::global(loc_de);
- // Set LANG environment variable to de_DE.
+ // Set LANG environment variable to de_DE@euro.
const char* oldLANG = getenv("LANG");
- if (!setenv("LANG", "de_DE", 1))
+ if (!setenv("LANG", "de_DE@euro", 1))
{
test01();
test02();