Mercurial > projects > ldc
annotate tangotests/b.d @ 133:44a95ac7368a trunk
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
In particular, assertions has been fixed to include file/line info, and much more!
author | lindquist |
---|---|
date | Mon, 14 Jan 2008 05:11:54 +0100 |
parents | 1700239cab2e |
children | 68a7dd38c03c |
rev | line source |
---|---|
132 | 1 class C |
2 { | |
3 int a; | |
4 union | |
5 { | |
6 int i; | |
7 double d; | |
8 } | |
9 int z; | |
10 } | |
11 | |
12 void func() | |
13 { | |
14 scope c = new C; | |
15 access1(c); | |
16 assert(c.i == 42); | |
17 access2(c); | |
18 assert(c.d == 2.5); | |
19 } | |
20 | |
21 void access1(C c) | |
22 { | |
23 c.i = 42; | |
24 } | |
25 | |
26 void access2(C c) | |
27 { | |
28 c.d = 2.5; | |
29 } |