From e6385cb74c35eb5a346237acecc846e52c4d6bd4 Mon Sep 17 00:00:00 2001 From: Pixel Date: Sat, 12 Nov 2011 21:52:02 +0100 Subject: Adding seekable buffers. Probably would need a few more tests in the Handles unit test. --- tests/test-Handles.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') diff --git a/tests/test-Handles.cc b/tests/test-Handles.cc index f9fd055..fd05c76 100644 --- a/tests/test-Handles.cc +++ b/tests/test-Handles.cc @@ -1,6 +1,7 @@ #include #include #include +#include #ifdef _WIN32 void ctime_r(const time_t * t, char * str) { @@ -70,5 +71,16 @@ void MainTask::Do() { Assert(s == 0); o->write("foo\n", 4); + IO b(new Buffer()); + s = b->rtell(); + Assert(s == 0); + s = b->wtell(); + Assert(s == 0); + b->write("foo\n", 4); + s = b->rtell(); + Assert(s == 0); + s = b->wtell(); + Assert(s == 4); + Printer::log(M_STATUS, "Test::Handles passed."); } -- cgit v1.2.3