diff options
Diffstat (limited to 'Examples/test-suite/d/sneaky1_runme.1.d')
-rw-r--r-- | Examples/test-suite/d/sneaky1_runme.1.d | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Examples/test-suite/d/sneaky1_runme.1.d b/Examples/test-suite/d/sneaky1_runme.1.d new file mode 100644 index 000000000..b293b4972 --- /dev/null +++ b/Examples/test-suite/d/sneaky1_runme.1.d @@ -0,0 +1,21 @@ +module sneaky1_runme; + +import sneaky1.sneaky1; + +void main() { + if (add(30, 2) != 32) { + throw new Exception("add test failed"); + } + + if (subtract(20, 2) != 18) { + throw new Exception("subtract test failed"); + } + + if (mul(20, 2) != 40) { + throw new Exception("mul test failed"); + } + + if (divide(20, 2) != 10) { + throw new Exception("div test failed"); + } +} |