From 98c4038df36fb73601c58ccd885d1c2d3703cf6e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 8 Sep 2021 08:26:54 +0200 Subject: Factor "buffered streambuf" interface from fdbuf to bufstreambuf Also rename fdbuf to fdstreambuf for consistency. --- tests/fdstream/driver.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/fdstream/driver.cxx b/tests/fdstream/driver.cxx index 76fc64a..2309a7a 100644 --- a/tests/fdstream/driver.cxx +++ b/tests/fdstream/driver.cxx @@ -575,7 +575,8 @@ main (int argc, const char* argv[]) t.join (); } - // Test setting and getting position via the non-standard fdbuf interface. + // Test setting and getting position via the non-standard fdstreambuf + // interface. // // Seek for read. // @@ -584,7 +585,7 @@ main (int argc, const char* argv[]) ifdstream is (f); - fdbuf* buf (dynamic_cast (is.rdbuf ())); + fdstreambuf* buf (dynamic_cast (is.rdbuf ())); assert (buf != nullptr); char c; @@ -627,7 +628,7 @@ main (int argc, const char* argv[]) { ifdstream is (f, fdopen_mode::in | fdopen_mode::out); - fdbuf* buf (dynamic_cast (is.rdbuf ())); + fdstreambuf* buf (dynamic_cast (is.rdbuf ())); assert (buf != nullptr); // Read till the end of the fragment. @@ -685,7 +686,7 @@ main (int argc, const char* argv[]) assert (static_cast (is.tellg ()) == 8); - const fdbuf* buf (dynamic_cast (is.rdbuf ())); + const fdstreambuf* buf (dynamic_cast (is.rdbuf ())); assert (buf != nullptr && buf->tellg () == 8); assert (from_stream (is) == "89"); @@ -704,7 +705,7 @@ main (int argc, const char* argv[]) assert (static_cast (os.tellp ()) == 2); - const fdbuf* buf (dynamic_cast (os.rdbuf ())); + const fdstreambuf* buf (dynamic_cast (os.rdbuf ())); assert (buf != nullptr && buf->tellp () == 2); os.close (); @@ -757,7 +758,7 @@ main (int argc, const char* argv[]) assert (static_cast (is.tellg ()) == 8); - const fdbuf* buf (dynamic_cast (is.rdbuf ())); + const fdstreambuf* buf (dynamic_cast (is.rdbuf ())); assert (buf != nullptr && buf->tellp () == 8); assert (from_stream (is) == "6789"); -- cgit v1.1