aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/27_io/filebuf_members.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/27_io/filebuf_members.cc')
-rw-r--r--libstdc++-v3/testsuite/27_io/filebuf_members.cc16
1 files changed, 4 insertions, 12 deletions
diff --git a/libstdc++-v3/testsuite/27_io/filebuf_members.cc b/libstdc++-v3/testsuite/27_io/filebuf_members.cc
index 3b028a5221a..59d6ea13acd 100644
--- a/libstdc++-v3/testsuite/27_io/filebuf_members.cc
+++ b/libstdc++-v3/testsuite/27_io/filebuf_members.cc
@@ -49,28 +49,24 @@ test_01()
int close_num;
// read (ext)
- int fd = open(name_01, O_RDONLY);
- VERIFY( fd >= 0 );
-
+ FILE* f2 = fopen(name_01, "r");
+ VERIFY( f2 != NULL );
{
- std::filebuf fb(fd, "double_read", std::ios_base::in);
+ std::filebuf fb(f2, std::ios_base::in, 512);
}
-
- close_num = close(fd);
+ close_num = fclose(f2);
VERIFY( close_num == 0 );
// read (standard)
FILE* f = fopen(name_01, "r");
VERIFY( f != NULL );
-
{
std::ifstream ifstream1(name_01);
VERIFY( ifstream1.is_open() );
std::ios_base::iostate st01 = ifstream1.rdstate();
VERIFY( st01 == std::ios_base::goodbit );
}
-
close_num = fclose(f);
VERIFY( close_num == 0 );
@@ -89,7 +85,3 @@ main()
test_01();
return 0;
}
-
-
-
-