Mercurial > projects > ldc
changeset 128:e5fe8521bbfa trunk
[svn r132] Added some tests. some will fail at the moment.
author | lindquist |
---|---|
date | Fri, 30 Nov 2007 17:12:08 +0100 |
parents | facc562f5674 |
children | 8096ba7082db |
files | test/classes11.d test/nested5.d test/nested6.d |
diffstat | 3 files changed, 66 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/classes11.d Fri Nov 30 17:12:08 2007 +0100 @@ -0,0 +1,15 @@ +module classes11; + +void main() +{ + static class C + { + void func() + { + printf("Hello world\n"); + } + } + + scope c = new C; + c.func(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/nested5.d Fri Nov 30 17:12:08 2007 +0100 @@ -0,0 +1,19 @@ +module nested5; + +void main() +{ + int i = 42; + + printf("Hello world %d\n", i++); + + class C + { + void func() + { + printf("Hello world %d\n", i++); + } + } + + scope c = new C; + c.func(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/nested6.d Fri Nov 30 17:12:08 2007 +0100 @@ -0,0 +1,32 @@ +module nested6; + +void main() +{ + int i = 42; + + printf("Hello world %d\n", i++); + + class C + { + void func() + { + printf("Hello world %d\n", i++); + + class C2 + { + void func2() + { + printf("Hello world %d\n", i++); + } + } + + { + scope c2 = new C2; + c2.func2(); + } + } + } + + scope c = new C; + c.func(); +}