Commit f883c8dc by Paolo Carlini

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
parent 38f9cd4c
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> 2003-10-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get::_M_extract_int): * include/bits/locale_facets.tcc (num_get::_M_extract_int):
......
...@@ -36,13 +36,8 @@ void test01() ...@@ -36,13 +36,8 @@ void test01()
// basic construction // basic construction
locale loc_c = locale::classic(); 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"); locale loc_de = __gnu_test::try_named_locale("de_DE@euro");
VERIFY( loc_c != loc_de ); VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
VERIFY( loc_de != loc_fr );
// cache the moneypunct facets // cache the moneypunct facets
typedef moneypunct<char, true> __money_true; typedef moneypunct<char, true> __money_true;
...@@ -54,14 +49,8 @@ void test01() ...@@ -54,14 +49,8 @@ void test01()
// total EPA budget FY 2002 // total EPA budget FY 2002
const string digits1("720000000000"); 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 // input less than frac_digits
const string digits4("-1"); const string digits2("-1");
// cache the money_put facet // cache the money_put facet
ostringstream oss; ostringstream oss;
...@@ -104,14 +93,14 @@ void test01() ...@@ -104,14 +93,14 @@ void test01()
// test various fill strategies // test various fill strategies
oss.str(empty); oss.str(empty);
oss.width(20); 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(); string result10 = oss.str();
VERIFY( result10 == "***************-,01*"); VERIFY( result10 == "***************-,01*");
oss.str(empty); oss.str(empty);
oss.width(20); oss.width(20);
oss.setf(ios_base::internal); 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(); string result11 = oss.str();
VERIFY( result11 == "-,01****************"); VERIFY( result11 == "-,01****************");
} }
......
...@@ -36,13 +36,8 @@ void test01() ...@@ -36,13 +36,8 @@ void test01()
// basic construction // basic construction
locale loc_c = locale::classic(); 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"); locale loc_de = __gnu_test::try_named_locale("de_DE@euro");
VERIFY( loc_c != loc_de ); VERIFY( loc_c != loc_de );
VERIFY( loc_hk != loc_fr );
VERIFY( loc_hk != loc_de );
VERIFY( loc_de != loc_fr );
// cache the moneypunct facets // cache the moneypunct facets
typedef moneypunct<wchar_t, true> __money_true; typedef moneypunct<wchar_t, true> __money_true;
...@@ -54,14 +49,8 @@ void test01() ...@@ -54,14 +49,8 @@ void test01()
// total EPA budget FY 2002 // total EPA budget FY 2002
const wstring digits1(L"720000000000"); 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 // input less than frac_digits
const wstring digits4(L"-1"); const wstring digits2(L"-1");
// cache the money_put facet // cache the money_put facet
wostringstream oss; wostringstream oss;
...@@ -104,14 +93,14 @@ void test01() ...@@ -104,14 +93,14 @@ void test01()
// test various fill strategies // test various fill strategies
oss.str(empty); oss.str(empty);
oss.width(20); 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(); wstring result10 = oss.str();
VERIFY( result10 == L"***************-,01*"); VERIFY( result10 == L"***************-,01*");
oss.str(empty); oss.str(empty);
oss.width(20); oss.width(20);
oss.setf(ios_base::internal); 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(); wstring result11 = oss.str();
VERIFY( result11 == L"-,01****************"); VERIFY( result11 == L"-,01****************");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment