summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNicolas 'Pixel' Noble <pixel@nobis-crew.org>2013-01-20 20:13:29 -0800
committerNicolas 'Pixel' Noble <pixel@nobis-crew.org>2013-01-20 20:13:29 -0800
commitf6e2bfe69c014b9b99423320ba787a3df938754b (patch)
tree5488041351a38bac3744df9d22e5ada6ea754b99 /tests
parent76ab3f1ddc143d65e97ab301c742ad6553f1b560 (diff)
Input's open, read and close are now operations fully interruptible.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-Tasks.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test-Tasks.cc b/tests/test-Tasks.cc
index 6bbb503..87a506e 100644
--- a/tests/test-Tasks.cc
+++ b/tests/test-Tasks.cc
@@ -2,6 +2,7 @@
#include <Task.h>
#include <TaskMan.h>
#include <StacklessTask.h>
+#include <Input.h>
using namespace Balau;
@@ -49,9 +50,15 @@ class TestStackless : public StacklessTask {
StacklessOperation(m_operation->Do());
TAssert(m_operation->completed());
delete m_operation;
+ m_handle = new Input("tests/rtest.txt");
+ StacklessOperation(m_handle->open());
+ StacklessOperation(m_handle->read(buf, 10));
+ StacklessOperation(m_handle->close());
StacklessEnd();
}
TestOperation * m_operation;
+ IO<Input> m_handle;
+ char buf[10];
};
static void yieldingFunction() {