ios_base_members_static.cc: Swap order of tests.

2001-02-05  Phil Edwards  <pme@sources.redhat.com>

	* testsuite/27_io/ios_base_members_static.cc:  Swap order of tests.

From-SVN: r39466
This commit is contained in:
Phil Edwards 2001-02-05 22:08:47 +00:00
parent 9b30b506d6
commit 58f60b5c91
2 changed files with 31 additions and 27 deletions

View File

@ -1,3 +1,7 @@
2001-02-05 Phil Edwards <pme@sources.redhat.com>
* testsuite/27_io/ios_base_members_static.cc: Swap order of tests.
2001-02-05 Mark Mitchell <mark@codesourcery.com>
* src/string-inst.cc (string::_M_replace): Explicitly instantiate.

View File

@ -30,7 +30,33 @@
#include <debug_assert.h>
bool test01()
// N.B. Once we have called sync_with_stdio(false), we can never go back.
void
test01()
{
std::ios_base::sync_with_stdio();
std::freopen("ios_base_members_static-1.txt", "w", stdout);
for (int i = 0; i < 2; i++)
{
std::printf("1");
std::cout << "2";
std::putc('3', stdout); // std::stdout doesn't work here
std::cout << '4';
std::fputs("5", stdout);
std::cout << 6;
std::putchar('7');
std::cout << 8 << '9';
if (i)
std::printf ("0\n");
else
std::cout << "0" << std::endl;
}
}
bool test02()
{
bool test = true;
@ -55,30 +81,6 @@ bool test01()
return test;
}
void
test02()
{
std::ios_base::sync_with_stdio();
std::freopen("ios_base_members_static-1.txt", "w", stdout);
for (int i = 0; i < 2; i++)
{
std::printf("1");
std::cout << "2";
std::putc('3', stdout); // std::stdout doesn't work here
std::cout << '4';
std::fputs("5", stdout);
std::cout << 6;
std::putchar('7');
std::cout << 8 << '9';
if (i)
std::printf ("0\n");
else
std::cout << "0" << std::endl;
}
}
int main(void)
{
test01();
@ -87,5 +89,3 @@ int main(void)
}