Commit bded68b1 by Paolo Carlini Committed by Paolo Carlini

ios_manip_basefield.cc (test01): Fix for 64 bit machines.

2002-02-27  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/27_io/ios_manip_basefield.cc (test01):
	Fix for 64 bit machines.

From-SVN: r50111
parent f458d1d5
2002-02-27 Paolo Carlini <pcarlini@unitus.it>
* testsuite/27_io/ios_manip_basefield.cc (test01):
Fix for 64 bit machines.
2002-02-26 Benjamin Kosnik <bkoz@redhat.com> 2002-02-26 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/basic_ios.tcc (basic_ios::init): Set _M_fill to zero. * include/bits/basic_ios.tcc (basic_ios::init): Set _M_fill to zero.
......
...@@ -46,27 +46,27 @@ test01() ...@@ -46,27 +46,27 @@ test01()
{ {
bool test = true; bool test = true;
const char lit[] = "037 777 654 322\n:037 776 543 211:\n:037 777 654 322 :\n" const char lit[] = "0123 456\n: 01 234 567:\n:0123 456 :\n"
": 037 777 765 433:\n: 037 777 776 544:\n: 04 553 207:\n" ": 012 345:\n: 01 234:\n: 04 553 207:\n"
":0361 100 :\n: 030 071:\n: 02 322:\n" ":0361 100 :\n: 030 071:\n: 02 322:\n"
"0x000012 345 678\n"; "0x000012 345 678\n";
std::ostringstream oss; std::ostringstream oss;
oss.imbue(std::locale(std::locale(), new MyNP)); oss.imbue(std::locale(std::locale(), new MyNP));
oss << std::oct << std::showbase; oss << std::oct << std::showbase;
oss << -0123456l << std::endl; oss << 0123456l << std::endl;
oss << ":" << std::setw(11); oss << ":" << std::setw(11);
oss << -01234567l << ":" << std::endl; oss << 01234567l << ":" << std::endl;
oss << ":" << std::setw(18) << std::left; oss << ":" << std::setw(11) << std::left;
oss << -0123456l << ":" << std::endl; oss << 0123456l << ":" << std::endl;
oss << ":" << std::setw(18) << std::right; oss << ":" << std::setw(11) << std::right;
oss << -012345l << ":" << std::endl; oss << 012345l << ":" << std::endl;
oss << ":" << std::setw(18) << std::internal; oss << ":" << std::setw(11) << std::internal;
oss << -01234l << ":" << std::endl; oss << 01234l << ":" << std::endl;
oss << ":" << std::setw(11); oss << ":" << std::setw(11);
oss << 1234567l << ":" << std::endl; oss << 1234567l << ":" << std::endl;
...@@ -128,11 +128,11 @@ main() ...@@ -128,11 +128,11 @@ main()
// Projected output: // Projected output:
/* /*
037 777 654 322 0123 456
:037 776 543 211: : 01 234 567:
:037 777 654 322 : :0123 456 :
: 037 777 765 433: : 012 345:
: 037 777 776 544: : 01 234:
: 04 553 207: : 04 553 207:
:0361 100 : :0361 100 :
: 030 071: : 030 071:
......
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