diff options
Diffstat (limited to 'Examples/test-suite/d/constover_runme.1.d')
-rw-r--r-- | Examples/test-suite/d/constover_runme.1.d | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Examples/test-suite/d/constover_runme.1.d b/Examples/test-suite/d/constover_runme.1.d new file mode 100644 index 000000000..ead67319e --- /dev/null +++ b/Examples/test-suite/d/constover_runme.1.d @@ -0,0 +1,31 @@ +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!"); +} |