Commit 73da19bb by Paolo Carlini Committed by Paolo Carlini

1.cc: Clean up.

2004-03-06  Paolo Carlini  <pcarlini@suse.de>

	* testsuite/22_locale/money_get/get/char/1.cc: Clean up.
	* testsuite/22_locale/money_get/get/char/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/char/4.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/2.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/3.cc: Likewise.
	* testsuite/22_locale/money_get/get/wchar_t/4.cc: Likewise.

From-SVN: r79019
parent 84289c76
2004-03-06 Paolo Carlini <pcarlini@suse.de> 2004-03-06 Paolo Carlini <pcarlini@suse.de>
* testsuite/22_locale/money_get/get/char/1.cc: Clean up.
* testsuite/22_locale/money_get/get/char/2.cc: Likewise.
* testsuite/22_locale/money_get/get/char/3.cc: Likewise.
* testsuite/22_locale/money_get/get/char/4.cc: Likewise.
* testsuite/22_locale/money_get/get/wchar_t/1.cc: Likewise.
* testsuite/22_locale/money_get/get/wchar_t/2.cc: Likewise.
* testsuite/22_locale/money_get/get/wchar_t/3.cc: Likewise.
* testsuite/22_locale/money_get/get/wchar_t/4.cc: Likewise.
2004-03-06 Paolo Carlini <pcarlini@suse.de>
* include/bits/locale_facets.tcc (num_get<>::_M_extract_float, * include/bits/locale_facets.tcc (num_get<>::_M_extract_float,
num_get<>::_M_extract_int, num_get<>::do_get(bool&), num_get<>::_M_extract_int, num_get<>::do_get(bool&),
__pad<>::_S_pad): Prefer plain operator== to traits::eq(). __pad<>::_S_pad): Prefer plain operator== to traits::eq().
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
void test01() void test01()
{ {
using namespace std; using namespace std;
typedef money_base::part part;
typedef money_base::pattern pattern;
typedef istreambuf_iterator<char> iterator_type; typedef istreambuf_iterator<char> iterator_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
...@@ -39,32 +37,18 @@ void test01() ...@@ -39,32 +37,18 @@ void test01()
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 );
// cache the moneypunct facets
typedef moneypunct<char, true> __money_true;
typedef moneypunct<char, false> __money_false;
// sanity check the data is correct. // sanity check the data is correct.
const string empty; const string empty;
// 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
const string digits4("-1");
iterator_type end; iterator_type end;
istringstream iss; istringstream iss;
iss.imbue(loc_de); iss.imbue(loc_de);
// cache the money_get facet // cache the money_get facet
const money_get<char>& mon_get = use_facet<money_get<char> >(iss.getloc()); const money_get<char>& mon_get = use_facet<money_get<char> >(iss.getloc());
iss.str("7.200.000.000,00 "); iss.str("7.200.000.000,00 ");
iterator_type is_it01(iss); iterator_type is_it01(iss);
string result1; string result1;
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
void test02() void test02()
{ {
using namespace std; using namespace std;
typedef money_base::part part;
typedef money_base::pattern pattern;
typedef istreambuf_iterator<char> iterator_type; typedef istreambuf_iterator<char> iterator_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
...@@ -39,22 +37,12 @@ void test02() ...@@ -39,22 +37,12 @@ void test02()
locale loc_hk = __gnu_test::try_named_locale("en_HK"); locale loc_hk = __gnu_test::try_named_locale("en_HK");
VERIFY( loc_c != loc_hk ); VERIFY( loc_c != loc_hk );
// cache the moneypunct facets
typedef moneypunct<char, true> __money_true;
typedef moneypunct<char, false> __money_false;
// sanity check the data is correct.
const string empty;
// 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 // est. cost, national missile "defense", expressed as a loss in USD 2001
const string digits2("-10000000000000"); 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 digits4("-1");
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
void test03() void test03()
{ {
using namespace std; using namespace std;
typedef money_base::part part;
typedef money_base::pattern pattern;
typedef istreambuf_iterator<char> iterator_type; typedef istreambuf_iterator<char> iterator_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
...@@ -39,13 +37,6 @@ void test03() ...@@ -39,13 +37,6 @@ void test03()
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 );
// cache the moneypunct facets
typedef moneypunct<char, true> __money_true;
typedef moneypunct<char, false> __money_false;
// sanity check the data is correct.
const string empty;
// total EPA budget FY 2002 // total EPA budget FY 2002
const long double digits1 = 720000000000.0; const long double digits1 = 720000000000.0;
......
...@@ -37,13 +37,6 @@ void test04() ...@@ -37,13 +37,6 @@ void test04()
locale loc_hk = __gnu_test::try_named_locale("en_HK"); locale loc_hk = __gnu_test::try_named_locale("en_HK");
VERIFY( loc_c != loc_hk ); VERIFY( loc_c != loc_hk );
// cache the moneypunct facets
typedef moneypunct<char, true> __money_true;
typedef moneypunct<char, false> __money_false;
// sanity check the data is correct.
const string empty;
// input less than frac_digits // input less than frac_digits
const long double digits4 = -1.0; const long double digits4 = -1.0;
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
void test01() void test01()
{ {
using namespace std; using namespace std;
typedef money_base::part part;
typedef money_base::pattern pattern;
typedef istreambuf_iterator<wchar_t> iterator_type; typedef istreambuf_iterator<wchar_t> iterator_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
...@@ -39,32 +37,18 @@ void test01() ...@@ -39,32 +37,18 @@ void test01()
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 );
// cache the moneypunct facets
typedef moneypunct<wchar_t, true> __money_true;
typedef moneypunct<wchar_t, false> __money_false;
// sanity check the data is correct. // sanity check the data is correct.
const wstring empty; const wstring empty;
// 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
const wstring digits4(L"-1");
iterator_type end; iterator_type end;
wistringstream iss; wistringstream iss;
iss.imbue(loc_de); iss.imbue(loc_de);
// cache the money_get facet // cache the money_get facet
const money_get<wchar_t>& mon_get = use_facet<money_get<wchar_t> >(iss.getloc()); const money_get<wchar_t>& mon_get = use_facet<money_get<wchar_t> >(iss.getloc());
iss.str(L"7.200.000.000,00 "); iss.str(L"7.200.000.000,00 ");
iterator_type is_it01(iss); iterator_type is_it01(iss);
wstring result1; wstring result1;
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
void test02() void test02()
{ {
using namespace std; using namespace std;
typedef money_base::part part;
typedef money_base::pattern pattern;
typedef istreambuf_iterator<wchar_t> iterator_type; typedef istreambuf_iterator<wchar_t> iterator_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
...@@ -39,22 +37,12 @@ void test02() ...@@ -39,22 +37,12 @@ void test02()
locale loc_hk = __gnu_test::try_named_locale("en_HK"); locale loc_hk = __gnu_test::try_named_locale("en_HK");
VERIFY( loc_c != loc_hk ); VERIFY( loc_c != loc_hk );
// cache the moneypunct facets
typedef moneypunct<wchar_t, true> __money_true;
typedef moneypunct<wchar_t, false> __money_false;
// sanity check the data is correct.
const wstring empty;
// 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 // est. cost, national missile "defense", expressed as a loss in USD 2001
const wstring digits2(L"-10000000000000"); 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 digits4(L"-1");
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
void test03() void test03()
{ {
using namespace std; using namespace std;
typedef money_base::part part;
typedef money_base::pattern pattern;
typedef istreambuf_iterator<wchar_t> iterator_type; typedef istreambuf_iterator<wchar_t> iterator_type;
bool test __attribute__((unused)) = true; bool test __attribute__((unused)) = true;
...@@ -39,13 +37,6 @@ void test03() ...@@ -39,13 +37,6 @@ void test03()
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 );
// cache the moneypunct facets
typedef moneypunct<wchar_t, true> __money_true;
typedef moneypunct<wchar_t, false> __money_false;
// sanity check the data is correct.
const wstring empty;
// total EPA budget FY 2002 // total EPA budget FY 2002
const long double digits1 = 720000000000.0; const long double digits1 = 720000000000.0;
......
...@@ -37,13 +37,6 @@ void test04() ...@@ -37,13 +37,6 @@ void test04()
locale loc_hk = __gnu_test::try_named_locale("en_HK"); locale loc_hk = __gnu_test::try_named_locale("en_HK");
VERIFY( loc_c != loc_hk ); VERIFY( loc_c != loc_hk );
// cache the moneypunct facets
typedef moneypunct<wchar_t, true> __money_true;
typedef moneypunct<wchar_t, false> __money_false;
// sanity check the data is correct.
const wstring empty;
// input less than frac_digits // input less than frac_digits
const long double digits4 = -1.0; const long double digits4 = -1.0;
......
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