1.cc: Clean up.

2003-10-26  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/money_put/put/char/1.cc: Clean up.
	* testsuite/22_locale/money_put/put/wchar_t/1.cc: Ditto.

From-SVN: r72949
This commit is contained in:
Paolo Carlini 2003-10-26 10:33:30 +00:00
parent 38f9cd4cac
commit f883c8dce3
3 changed files with 40 additions and 57 deletions

View File

@ -1,3 +1,8 @@
2003-10-26 Paolo Carlini <pcarlini@suse.de>
* testsuite/22_locale/money_put/put/char/1.cc: Clean up.
* testsuite/22_locale/money_put/put/wchar_t/1.cc: Ditto.
2003-10-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get::_M_extract_int):

View File

@ -36,13 +36,8 @@ void test01()
// 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@euro");
VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
VERIFY( loc_de != loc_fr );
// cache the moneypunct facets
typedef moneypunct<char, true> __money_true;
@ -54,14 +49,8 @@ void test01()
// total EPA budget FY 2002
const string digits1("720000000000");
// est. cost, national missile "defense", expressed as a loss in USD 2001
const string digits2("-10000000000000");
// not valid input
const string digits3("-A");
// input less than frac_digits
const string digits4("-1");
const string digits2("-1");
// cache the money_put facet
ostringstream oss;
@ -104,14 +93,14 @@ void test01()
// test various fill strategies
oss.str(empty);
oss.width(20);
iterator_type os_it10 = mon_put.put(oss.rdbuf(), true, oss, '*', digits4);
iterator_type os_it10 = mon_put.put(oss.rdbuf(), true, oss, '*', digits2);
string result10 = oss.str();
VERIFY( result10 == "***************-,01*");
oss.str(empty);
oss.width(20);
oss.setf(ios_base::internal);
iterator_type os_it11 = mon_put.put(oss.rdbuf(), true, oss, '*', digits4);
iterator_type os_it11 = mon_put.put(oss.rdbuf(), true, oss, '*', digits2);
string result11 = oss.str();
VERIFY( result11 == "-,01****************");
}

View File

@ -36,13 +36,8 @@ void test01()
// 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@euro");
VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
VERIFY( loc_de != loc_fr );
// cache the moneypunct facets
typedef moneypunct<wchar_t, true> __money_true;
@ -54,14 +49,8 @@ void test01()
// total EPA budget FY 2002
const wstring digits1(L"720000000000");
// est. cost, national missile "defense", expressed as a loss in USD 2001
const wstring digits2(L"-10000000000000");
// not valid input
const wstring digits3(L"-A");
// input less than frac_digits
const wstring digits4(L"-1");
const wstring digits2(L"-1");
// cache the money_put facet
wostringstream oss;
@ -104,14 +93,14 @@ void test01()
// test various fill strategies
oss.str(empty);
oss.width(20);
iterator_type os_it10 = mon_put.put(oss.rdbuf(), true, oss, '*', digits4);
iterator_type os_it10 = mon_put.put(oss.rdbuf(), true, oss, '*', digits2);
wstring result10 = oss.str();
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, '*', digits4);
iterator_type os_it11 = mon_put.put(oss.rdbuf(), true, oss, '*', digits2);
wstring result11 = oss.str();
VERIFY( result11 == L"-,01****************");
}