PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 1ms 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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. module constover_runme;
  2. import constover.constover;
  3. import constover.Foo;
  4. void main() {
  5. char[] p = test("test");
  6. if (p != "test")
  7. throw new Exception("test failed!");
  8. p = test_pconst("test");
  9. if (p != "test_pconst")
  10. throw new Exception("test_pconst failed!");
  11. auto f = new Foo();
  12. p = f.test("test");
  13. if (p != "test")
  14. throw new Exception("member-test failed!");
  15. p = f.test_pconst("test");
  16. if (p != "test_pconst")
  17. throw new Exception("member-test_pconst failed!");
  18. p = f.test_constm("test");
  19. if (p != "test_constmethod")
  20. throw new Exception("member-test_constm failed!");
  21. p = f.test_pconstm("test");
  22. if (p != "test_pconstmethod")
  23. throw new Exception("member-test_pconstm failed!");
  24. }