Add tests.

This commit is contained in:
Christian Kamm
2008-10-07 20:22:04 +02:00
parent b90799a376
commit 3506960765
2 changed files with 11 additions and 0 deletions

7
tests/mini/boolexp.d Normal file
View File

@@ -0,0 +1,7 @@
bool got() { return true; }
extern(C) int printf(char*, ...);
void main()
{
bool b = true && got();
printf("%d\n", b ? 1 : 0);
}

4
tests/mini/dottypeexp.d Normal file
View File

@@ -0,0 +1,4 @@
extern(C) int printf(char*, ...);
template Foo() { void test() { printf("test\n"); typeof(this).whee(); } }
class Bar { void whee() { printf("whee\n"); } mixin Foo!(); }
void main() { (new Bar).test(); }