summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNicolas 'Pixel' Noble <pixel@nobis-crew.org>2013-01-21 20:57:04 -0800
committerNicolas 'Pixel' Noble <pixel@nobis-crew.org>2013-01-21 20:57:04 -0800
commitb89df4ea0cf33408109658f674ff0453b7569e04 (patch)
treeb3bb702310f5bec649740ced392eb3d0013eab7f /tests
parenta91b18c00cf38e2db339f06766e2def626c65aa1 (diff)
Slightly more fun this way IMHO.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-Handles.cc15
1 files changed, 7 insertions, 8 deletions
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<Handle> h;
- IO<ZStream> z;
+ IO<Handle> 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<Output>()->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<Input>()->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();
}