diff options
Diffstat (limited to 'Examples/test-suite/d/catches_strings_runme.1.d')
-rw-r--r-- | Examples/test-suite/d/catches_strings_runme.1.d | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/Examples/test-suite/d/catches_strings_runme.1.d b/Examples/test-suite/d/catches_strings_runme.1.d deleted file mode 100644 index 89108355b..000000000 --- a/Examples/test-suite/d/catches_strings_runme.1.d +++ /dev/null @@ -1,32 +0,0 @@ -module catches_strings_runme; - -import catches_strings.catches_strings; -import catches_strings.StringsThrower; -import std.algorithm; - -void main() { - { - bool exception_thrown = false; - try { - StringsThrower.charstring(); - } catch (Exception e) { - if (!canFind(e.msg, "charstring message")) - throw new Exception("incorrect exception message:" ~ e.msg); - exception_thrown = true; - } - if (!exception_thrown) - throw new Exception("Should have thrown an exception"); - } - { - bool exception_thrown = false; - try { - StringsThrower.stdstring(); - } catch (Exception e) { - if (!canFind(e.msg, "stdstring message")) - throw new Exception("incorrect exception message:" ~ e.msg); - exception_thrown = true; - } - if (!exception_thrown) - throw new Exception("Should have thrown an exception"); - } -} |