From 165e03670b2fcef836dfebd95c053be5a94b255f Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Mon, 13 May 2002 14:31:50 +0200 Subject: 2002-05-13 Paolo Carlini Jakub Jelinek * 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. Co-Authored-By: Jakub Jelinek From-SVN: r53420 --- libstdc++-v3/ChangeLog | 14 ++++++++++++++ .../testsuite/22_locale/money_get_members_char.cc | 16 ++++++++-------- .../testsuite/22_locale/money_get_members_wchar_t.cc | 16 ++++++++-------- .../testsuite/22_locale/money_put_members_char.cc | 18 +++++++++--------- .../testsuite/22_locale/money_put_members_wchar_t.cc | 18 +++++++++--------- 5 files changed, 48 insertions(+), 34 deletions(-) (limited to 'libstdc++-v3') diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index c8ff8db..23308e3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,4 +1,18 @@ 2002-05-13 Paolo Carlini + Jakub Jelinek + + * 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 * 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 4bc3e45..1d80e75 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 3d237199..3d95d26 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 5738935..6cae3d7 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 9143fb6..c913251 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(); -- cgit v1.1