[svn r132] Added some tests. some will fail at the moment.

This commit is contained in:
Tomas Lindquist Olsen
2007-11-30 17:12:08 +01:00
parent 0a226c956f
commit f420bc1265
3 changed files with 66 additions and 0 deletions

15
test/classes11.d Normal file
View File

@@ -0,0 +1,15 @@
module classes11;
void main()
{
static class C
{
void func()
{
printf("Hello world\n");
}
}
scope c = new C;
c.func();
}

19
test/nested5.d Normal file
View File

@@ -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();
}

32
test/nested6.d Normal file
View File

@@ -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();
}