PageRenderTime 23ms CodeModel.GetById 15ms app.highlight 4ms RepoModel.GetById 1ms 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
 1module sneaky1_runme;
 2
 3import sneaky1.sneaky1;
 4
 5void main() {
 6  if (add(30, 2) != 32) {
 7    throw new Exception("add test failed");
 8  }
 9
10  if (subtract(20, 2) != 18) {
11    throw new Exception("subtract test failed");
12  }
13
14  if (mul(20, 2) != 40) {
15    throw new Exception("mul test failed");
16  }
17
18  if (divide(20, 2) != 10) {
19    throw new Exception("div test failed");
20  }
21}