Mercurial > projects > dstress
annotate run/unittest_04.d @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
parents | 1e6afb94ce6d |
children |
rev | line source |
---|---|
338 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // unittests inside of structs allowed since dmd-0.118 | |
6 | |
736 | 7 // __DSTRESS_TORTURE_BLOCK__ -release |
338 | 8 // __DSTRESS_DFLAGS__ -unittest |
9 | |
10 module dstress.run.unittest_04; | |
11 | |
12 bool tested; | |
13 | |
14 struct MyStruct{ | |
15 unittest{ | |
16 assert(!tested); | |
17 tested=true; | |
18 } | |
19 } | |
20 | |
21 int main(){ | |
22 assert(tested); | |
23 return 0; | |
24 } |