mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-18 05:43:14 +01:00
Add tests.
This commit is contained in:
7
tests/mini/boolexp.d
Normal file
7
tests/mini/boolexp.d
Normal 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
4
tests/mini/dottypeexp.d
Normal 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(); }
|
||||
Reference in New Issue
Block a user