From 965148b43b5b859934b7af2e8447ba1026a43a19 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 10 Oct 2011 19:36:55 -0700 Subject: Adding the basic "Handle" structure, and adding an early version of Input. Renamed suspend() to yield(). Fixed a couple of bugs, and reorganized slightly some code. --- tests/test-Handles.cc | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/test-Handles.cc (limited to 'tests/test-Handles.cc') diff --git a/tests/test-Handles.cc b/tests/test-Handles.cc new file mode 100644 index 0000000..38b020b --- /dev/null +++ b/tests/test-Handles.cc @@ -0,0 +1,22 @@ +#include +#include + +BALAU_STARTUP; + +using namespace Balau; + +void MainTask::Do() { + Printer::log(M_STATUS, "Test::Handles running."); + + bool failed = false; + try { + IO i(new Input("SomeInexistantFile.txt")); + } + catch (GeneralException) { + failed = true; + } + Assert(failed); + IO i(new Input("Makefile")); + + Printer::log(M_STATUS, "Test::Handles passed."); +} -- cgit v1.2.3