[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:
Tomas Lindquist Olsen
2008-07-13 02:51:19 +02:00
parent d1e41f611e
commit cecb64b2e4
339 changed files with 388 additions and 172 deletions
+27
View File
@@ -0,0 +1,27 @@
module aa3;
extern(C) int printf(char*, ...);
alias char[] string;
void main()
{
int[string] aa;
{aa["hello"] = 1;}
{int* p = "" in aa;}
aa[" worl"] = 2;
aa["d"] = 3;
aa["thisisgreat"] = 10;
int sum;
string cat;
{
foreach(k,v;aa)
{
printf("int[%.*s] = %d\n", k.length, k.ptr, v);
sum += v;
cat ~= k;
}
}
assert(sum == 16);
printf("cat = %.*s\n", cat.length, cat.ptr);
assert(cat.length == 22);
}