mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-19 10:19:03 +02:00
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
This commit is contained in:
12
tests/mini/memory1.d
Normal file
12
tests/mini/memory1.d
Normal file
@@ -0,0 +1,12 @@
|
||||
module memory1;
|
||||
|
||||
extern(C) int printf(char*,...);
|
||||
|
||||
void main()
|
||||
{
|
||||
auto a = new int[16];
|
||||
{printf("array.length = %u\n", a.length);}
|
||||
{a.length = a.length + 1;}
|
||||
{printf("array.length = %u\n", a.length);}
|
||||
{assert(a.length == 17);}
|
||||
}
|
||||
Reference in New Issue
Block a user