PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
D | 31 lines | 24 code | 7 blank | 0 comment | 12 complexity | af9df36c6c9e5e28caa3fce5b74d4ce9 MD5 | raw file
 1module constover_runme;
 2
 3import constover.constover;
 4import constover.Foo;
 5
 6void main() {
 7  char[] p = test("test");
 8  if (p != "test")
 9    throw new Exception("test failed!");
10
11  p = test_pconst("test");
12  if (p != "test_pconst")
13    throw new Exception("test_pconst failed!");
14
15  auto f = new Foo();
16  p = f.test("test");
17  if (p != "test")
18    throw new Exception("member-test failed!");
19
20  p = f.test_pconst("test");
21  if (p != "test_pconst")
22    throw new Exception("member-test_pconst failed!");
23
24  p = f.test_constm("test");
25  if (p != "test_constmethod")
26    throw new Exception("member-test_constm failed!");
27
28  p = f.test_pconstm("test");
29  if (p != "test_pconstmethod")
30    throw new Exception("member-test_pconstm failed!");
31}