Mercurial > projects > dstress
annotate run/InExpression_07.d @ 1599:d37b19f7e8bb
Move run/c/case_01 to nocompile.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 09 Sep 2008 17:28:31 +0200 |
parents | da000f026b76 |
children |
rev | line source |
---|---|
180 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.InExpression_07; | |
6 | |
7 class MyClass{ | |
8 int i; | |
9 char c; | |
10 } | |
11 | |
12 int main(){ | |
13 MyClass value = new MyClass(); | |
14 value.i = 1; | |
15 value.c = '1'; | |
16 char[] key = "eins"; | |
17 MyClass[char[]] array; | |
18 | |
19 array[key]=value; | |
20 MyClass* ptr = key in array; | |
21 | |
22 assert(value.i == ptr.i); | |
23 assert(value.c == ptr.c); | |
24 | |
25 value.i++; | |
26 value.c--; | |
27 | |
28 assert(value.i == ptr.i); | |
29 assert(value.c == ptr.c); | |
30 | |
31 return 0; | |
32 } |