From b89df4ea0cf33408109658f674ff0453b7569e04 Mon Sep 17 00:00:00 2001 From: Nicolas 'Pixel' Noble Date: Mon, 21 Jan 2013 20:57:04 -0800 Subject: Slightly more fun this way IMHO. --- tests/test-Handles.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/test-Handles.cc b/tests/test-Handles.cc index 1beba1c..c411c46 100644 --- a/tests/test-Handles.cc +++ b/tests/test-Handles.cc @@ -259,8 +259,7 @@ void SimpleTaskTest::Do() { class StacklessTaskTest : public StacklessTask { virtual void Do(); const char * getName() const { return "StacklessTaskTest"; } - IO h; - IO z; + IO h, s; uint8_t data[dg.size]; ssize_t r; }; @@ -282,18 +281,18 @@ void StacklessTaskTest::Do() { h = new Output("tests/data.gz"); StacklessOperation(h.asA()->open()); - z = new ZStream(h, Z_BEST_COMPRESSION, ZStream::GZIP); - StacklessOperation(r = z->write(dg.getData(), dg.size)); + s = new ZStream(h, Z_BEST_COMPRESSION, ZStream::GZIP); + StacklessOperation(r = s->write(dg.getData(), dg.size)); TAssert(r == dg.size); - StacklessOperation(z->close()); + StacklessOperation(s->close()); h = new Input("tests/data.gz"); StacklessOperation(h.asA()->open()); - z = new ZStream(h, Z_BEST_COMPRESSION, ZStream::GZIP); - StacklessOperation(r = z->read(data, dg.size)); + s = new ZStream(h, Z_BEST_COMPRESSION, ZStream::GZIP); + StacklessOperation(r = s->read(data, dg.size)); TAssert(r == dg.size); TAssert(memcmp(dg.getData(), data, dg.size) == 0); - StacklessOperation(z->close()); + StacklessOperation(s->close()); StacklessEnd(); } -- cgit v1.2.3