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.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r53420
This commit is contained in:
Paolo Carlini 2002-05-13 14:31:50 +02:00 committed by Paolo Carlini
parent 27b4d95a00
commit 165e03670b
5 changed files with 48 additions and 34 deletions

View File

@ -1,3 +1,17 @@
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> 2002-05-13 Paolo Carlini <pcarlini@unitus.it>
* testsuite/22_locale/codecvt_members_char_char.cc * testsuite/22_locale/codecvt_members_char_char.cc

View File

@ -41,7 +41,7 @@ void test01()
locale loc_c = locale::classic(); locale loc_c = locale::classic();
locale loc_hk("en_HK"); locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro"); locale loc_fr("fr_FR@euro");
locale loc_de("de_DE"); locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de ); VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de ); VERIFY( loc_hk != loc_de );
@ -122,7 +122,7 @@ void test01()
// now try with showbase, to get currency symbol in format // now try with showbase, to get currency symbol in format
iss.setf(ios_base::showbase); 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); iterator_type is_it06(iss);
string result6; string result6;
ios_base::iostate err06 = ios_base::goodbit; ios_base::iostate err06 = ios_base::goodbit;
@ -130,7 +130,7 @@ void test01()
VERIFY( result6 == digits1 ); VERIFY( result6 == digits1 );
VERIFY( err06 == ios_base::eofbit ); 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); iterator_type is_it07(iss);
string result7; string result7;
ios_base::iostate err07 = ios_base::goodbit; ios_base::iostate err07 = ios_base::goodbit;
@ -138,7 +138,7 @@ void test01()
VERIFY( result7 == digits1 ); VERIFY( result7 == digits1 );
VERIFY( err07 == ios_base::goodbit ); 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); iterator_type is_it08(iss);
string result8; string result8;
ios_base::iostate err08 = ios_base::goodbit; ios_base::iostate err08 = ios_base::goodbit;
@ -216,7 +216,7 @@ void test02()
locale loc_c = locale::classic(); locale loc_c = locale::classic();
locale loc_hk("en_HK"); locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro"); locale loc_fr("fr_FR@euro");
locale loc_de("de_DE"); locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de ); VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de ); VERIFY( loc_hk != loc_de );
@ -324,12 +324,12 @@ void test04()
{ {
#ifdef _GLIBCPP_HAVE_SETENV #ifdef _GLIBCPP_HAVE_SETENV
// Set the global locale to non-"C". // 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); 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"); const char* oldLANG = getenv("LANG");
if (!setenv("LANG", "de_DE", 1)) if (!setenv("LANG", "de_DE@euro", 1))
{ {
test01(); test01();
test02(); test02();

View File

@ -42,7 +42,7 @@ void test01()
locale loc_c = locale::classic(); locale loc_c = locale::classic();
locale loc_hk("en_HK"); locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro"); locale loc_fr("fr_FR@euro");
locale loc_de("de_DE"); locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de ); VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de ); VERIFY( loc_hk != loc_de );
@ -123,7 +123,7 @@ void test01()
// now try with showbase, to get currency symbol in format // now try with showbase, to get currency symbol in format
iss.setf(ios_base::showbase); 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); iterator_type is_it06(iss);
wstring result6; wstring result6;
ios_base::iostate err06 = ios_base::goodbit; ios_base::iostate err06 = ios_base::goodbit;
@ -131,7 +131,7 @@ void test01()
VERIFY( result6 == digits1 ); VERIFY( result6 == digits1 );
VERIFY( err06 == ios_base::eofbit ); 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); iterator_type is_it07(iss);
wstring result7; wstring result7;
ios_base::iostate err07 = ios_base::goodbit; ios_base::iostate err07 = ios_base::goodbit;
@ -139,7 +139,7 @@ void test01()
VERIFY( result7 == digits1 ); VERIFY( result7 == digits1 );
VERIFY( err07 == ios_base::goodbit ); 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); iterator_type is_it08(iss);
wstring result8; wstring result8;
ios_base::iostate err08 = ios_base::goodbit; ios_base::iostate err08 = ios_base::goodbit;
@ -218,7 +218,7 @@ void test02()
locale loc_c = locale::classic(); locale loc_c = locale::classic();
locale loc_hk("en_HK"); locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro"); locale loc_fr("fr_FR@euro");
locale loc_de("de_DE"); locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de ); VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de ); VERIFY( loc_hk != loc_de );
@ -326,12 +326,12 @@ void test04()
{ {
#ifdef _GLIBCPP_HAVE_SETENV #ifdef _GLIBCPP_HAVE_SETENV
// Set the global locale to non-"C". // 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); 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"); const char* oldLANG = getenv("LANG");
if (!setenv("LANG", "de_DE", 1)) if (!setenv("LANG", "de_DE@euro", 1))
{ {
test01(); test01();
test02(); test02();

View File

@ -41,7 +41,7 @@ void test01()
locale loc_c = locale::classic(); locale loc_c = locale::classic();
locale loc_hk("en_HK"); locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro"); locale loc_fr("fr_FR@euro");
locale loc_de("de_DE"); locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de ); VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de ); VERIFY( loc_hk != loc_de );
@ -97,12 +97,12 @@ void test01()
oss.str(empty); 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, ' ', digits1);
string result3 = oss.str(); string result3 = oss.str();
VERIFY( result3 == "7.200.000.000,00 DEM "); VERIFY( result3 == "7.200.000.000,00 EUR ");
oss.str(empty); 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, ' ', digits1);
string result4 = oss.str(); 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. // intl and non-intl versions should be different.
VERIFY( result3 != result4 ); VERIFY( result3 != result4 );
@ -175,7 +175,7 @@ void test02()
locale loc_c = locale::classic(); locale loc_c = locale::classic();
locale loc_hk("en_HK"); locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro"); locale loc_fr("fr_FR@euro");
locale loc_de("de_DE"); locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de ); VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de ); VERIFY( loc_hk != loc_de );
@ -228,12 +228,12 @@ void test02()
oss.str(empty); 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, ' ', digits1);
string result3 = oss.str(); string result3 = oss.str();
VERIFY( result3 == "7.200.000.000,00 DEM "); VERIFY( result3 == "7.200.000.000,00 EUR ");
oss.str(empty); 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, ' ', digits1);
string result4 = oss.str(); 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. // intl and non-intl versions should be different.
VERIFY( result3 != result4 ); VERIFY( result3 != result4 );
@ -288,12 +288,12 @@ void test04()
{ {
#ifdef _GLIBCPP_HAVE_SETENV #ifdef _GLIBCPP_HAVE_SETENV
// Set the global locale to non-"C". // 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); 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"); const char* oldLANG = getenv("LANG");
if (!setenv("LANG", "de_DE", 1)) if (!setenv("LANG", "de_DE@euro", 1))
{ {
test01(); test01();
test02(); test02();

View File

@ -42,7 +42,7 @@ void test01()
locale loc_c = locale::classic(); locale loc_c = locale::classic();
locale loc_hk("en_HK"); locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro"); locale loc_fr("fr_FR@euro");
locale loc_de("de_DE"); locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de ); VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de ); VERIFY( loc_hk != loc_de );
@ -97,12 +97,12 @@ void test01()
oss.str(empty); 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, ' ', digits1);
wstring result3 = oss.str(); 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); 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, ' ', digits1);
wstring result4 = oss.str(); 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. // intl and non-intl versions should be different.
VERIFY( result3 != result4 ); VERIFY( result3 != result4 );
@ -175,7 +175,7 @@ void test02()
locale loc_c = locale::classic(); locale loc_c = locale::classic();
locale loc_hk("en_HK"); locale loc_hk("en_HK");
locale loc_fr("fr_FR@euro"); locale loc_fr("fr_FR@euro");
locale loc_de("de_DE"); locale loc_de("de_DE@euro");
VERIFY( loc_c != loc_de ); VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr ); VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de ); VERIFY( loc_hk != loc_de );
@ -228,12 +228,12 @@ void test02()
oss.str(empty); 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, ' ', digits1);
wstring result3 = oss.str(); 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); 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, ' ', digits1);
wstring result4 = oss.str(); 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. // intl and non-intl versions should be different.
VERIFY( result3 != result4 ); VERIFY( result3 != result4 );
@ -288,12 +288,12 @@ void test04()
{ {
#ifdef _GLIBCPP_HAVE_SETENV #ifdef _GLIBCPP_HAVE_SETENV
// Set the global locale to non-"C". // 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); 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"); const char* oldLANG = getenv("LANG");
if (!setenv("LANG", "de_DE", 1)) if (!setenv("LANG", "de_DE@euro", 1))
{ {
test01(); test01();
test02(); test02();