diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-12 21:52:02 +0100 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-12 21:52:02 +0100 |
commit | e6385cb74c35eb5a346237acecc846e52c4d6bd4 (patch) | |
tree | c3feffa44aea1a327f67a6298bf76f9d60cd41bc /tests | |
parent | eb773a11ab557e01569b95254d7e21a53706640d (diff) |
Adding seekable buffers. Probably would need a few more tests in the Handles unit test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-Handles.cc | 12 |
1 files changed, 12 insertions, 0 deletions
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 <Main.h> #include <Input.h> #include <Output.h> +#include <Buffer.h> #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<Handle> 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."); } |