PageRenderTime 45ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/d/sneaky1_runme.1.d

#
D | 21 lines | 16 code | 5 blank | 0 comment | 8 complexity | 464e122115d8528a60398f344ca8249e MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. module sneaky1_runme;
  2. import sneaky1.sneaky1;
  3. void main() {
  4. if (add(30, 2) != 32) {
  5. throw new Exception("add test failed");
  6. }
  7. if (subtract(20, 2) != 18) {
  8. throw new Exception("subtract test failed");
  9. }
  10. if (mul(20, 2) != 40) {
  11. throw new Exception("mul test failed");
  12. }
  13. if (divide(20, 2) != 10) {
  14. throw new Exception("div test failed");
  15. }
  16. }