summaryrefslogtreecommitdiff
path: root/tests/test-Tasks.cc
diff options
context:
space:
mode:
authorNicolas 'Pixel' Noble <pixel@nobis-crew.org>2013-01-20 20:24:47 -0800
committerNicolas 'Pixel' Noble <pixel@nobis-crew.org>2013-01-20 20:24:47 -0800
commit6767ebafaa23b620c3513ab4973cdc8c51ead325 (patch)
treecd4f5c15c7e28d9104cec44f17228f7d0a02db9e /tests/test-Tasks.cc
parentf6e2bfe69c014b9b99423320ba787a3df938754b (diff)
Strengthening the stackless test for Input.
Diffstat (limited to 'tests/test-Tasks.cc')
-rw-r--r--tests/test-Tasks.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test-Tasks.cc b/tests/test-Tasks.cc
index 87a506e..33bdd72 100644
--- a/tests/test-Tasks.cc
+++ b/tests/test-Tasks.cc
@@ -45,6 +45,7 @@ class TestStackless : public StacklessTask {
virtual const char * getName() const { return "TestStackless"; }
private:
virtual void Do() {
+ ssize_t r;
StacklessBegin();
m_operation = new TestOperation();
StacklessOperation(m_operation->Do());
@@ -52,13 +53,14 @@ class TestStackless : public StacklessTask {
delete m_operation;
m_handle = new Input("tests/rtest.txt");
StacklessOperation(m_handle->open());
- StacklessOperation(m_handle->read(buf, 10));
+ StacklessOperation(r = m_handle->read(buf, 25));
+ TAssert(r == 10);
StacklessOperation(m_handle->close());
StacklessEnd();
}
TestOperation * m_operation;
IO<Input> m_handle;
- char buf[10];
+ char buf[25];
};
static void yieldingFunction() {