summaryrefslogtreecommitdiff
path: root/tests/test-Handles.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-Handles.cc')
-rw-r--r--tests/test-Handles.cc22
1 files changed, 22 insertions, 0 deletions
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 <Main.h>
+#include <Input.h>
+
+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.");
+}