aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/d/throw_exception_runme.1.d
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/d/throw_exception_runme.1.d')
-rw-r--r--Examples/test-suite/d/throw_exception_runme.1.d30
1 files changed, 0 insertions, 30 deletions
diff --git a/Examples/test-suite/d/throw_exception_runme.1.d b/Examples/test-suite/d/throw_exception_runme.1.d
deleted file mode 100644
index f2397a202..000000000
--- a/Examples/test-suite/d/throw_exception_runme.1.d
+++ /dev/null
@@ -1,30 +0,0 @@
-module throw_exception_runme;
-
-import throw_exception.Foo;
-
-void main() {
- test!("test_int");
- test!("test_msg");
- test!("test_cls");
- test!("test_cls_ptr");
- test!("test_cls_ref");
- test!("test_cls_td");
- test!("test_cls_ptr_td");
- test!("test_cls_ref_td");
- test!("test_array");
- test!("test_enum");
-}
-
-void test(char[] methodName)() {
- auto foo = new Foo();
-
- bool didntThrow;
- try {
- mixin("foo." ~ methodName ~ "();");
- didntThrow = true;
- } catch (Exception) {}
-
- if (didntThrow) {
- throw new Exception(methodName ~ " failed");
- }
-}