From f420bc12655958f3c61234fdba49bf1c93e1f555 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Fri, 30 Nov 2007 17:12:08 +0100 Subject: [PATCH] [svn r132] Added some tests. some will fail at the moment. --- test/classes11.d | 15 +++++++++++++++ test/nested5.d | 19 +++++++++++++++++++ test/nested6.d | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 test/classes11.d create mode 100644 test/nested5.d create mode 100644 test/nested6.d diff --git a/test/classes11.d b/test/classes11.d new file mode 100644 index 00000000..91d5733a --- /dev/null +++ b/test/classes11.d @@ -0,0 +1,15 @@ +module classes11; + +void main() +{ + static class C + { + void func() + { + printf("Hello world\n"); + } + } + + scope c = new C; + c.func(); +} diff --git a/test/nested5.d b/test/nested5.d new file mode 100644 index 00000000..c6729714 --- /dev/null +++ b/test/nested5.d @@ -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(); +} diff --git a/test/nested6.d b/test/nested6.d new file mode 100644 index 00000000..4cc701f0 --- /dev/null +++ b/test/nested6.d @@ -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(); +}