/trunk/Examples/test-suite/d/constover_runme.1.d
# · D · 31 lines · 24 code · 7 blank · 0 comment · 12 complexity · af9df36c6c9e5e28caa3fce5b74d4ce9 MD5 · raw file
- module constover_runme;
- import constover.constover;
- import constover.Foo;
- void main() {
- char[] p = test("test");
- if (p != "test")
- throw new Exception("test failed!");
- p = test_pconst("test");
- if (p != "test_pconst")
- throw new Exception("test_pconst failed!");
- auto f = new Foo();
- p = f.test("test");
- if (p != "test")
- throw new Exception("member-test failed!");
- p = f.test_pconst("test");
- if (p != "test_pconst")
- throw new Exception("member-test_pconst failed!");
- p = f.test_constm("test");
- if (p != "test_constmethod")
- throw new Exception("member-test_constm failed!");
- p = f.test_pconstm("test");
- if (p != "test_pconstmethod")
- throw new Exception("member-test_pconstm failed!");
- }