From f6e2bfe69c014b9b99423320ba787a3df938754b Mon Sep 17 00:00:00 2001 From: Nicolas 'Pixel' Noble Date: Sun, 20 Jan 2013 20:13:29 -0800 Subject: Input's open, read and close are now operations fully interruptible. --- tests/test-Tasks.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tests/test-Tasks.cc') 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 #include #include +#include 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 m_handle; + char buf[10]; }; static void yieldingFunction() { -- cgit v1.2.3