Mercurial > projects > dstress
comparison run/mini/aa7.d @ 1628:c6ef09dfba4d
add mini test set from ldc project
author | Moritz Warning <moritzwarning@web.de> |
---|---|
date | Mon, 10 Jan 2011 19:47:18 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1627:e1b954780837 | 1628:c6ef09dfba4d |
---|---|
1 // adapted from dstress.run.a.associative_array_19_<n> to catch regressions early | |
2 | |
3 module mini.aa7; | |
4 | |
5 extern (C) int printf(char*, ...); | |
6 extern (C) void gc_collect(); | |
7 | |
8 | |
9 int main(){ | |
10 char*[char] aa; | |
11 | |
12 char key = 'a'; | |
13 aa[key] = &key; | |
14 gc_collect(); | |
15 assert(aa[key] == &key); | |
16 assert(key in aa); | |
17 | |
18 return 0; | |
19 } | |
20 |