annotate run/invariant_04.d @ 1597:8b9d4d2f925a

Fix typos in complex tests. See D bug 614.
author Christian Kamm <kamm incasoftware de>
date Tue, 09 Sep 2008 16:53:58 +0200
parents ec5e144583ea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
338
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
1 // $HeadURL$
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
2 // $Date$
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
3 // $Author$
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
4
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
5 // @author@ Thomas Kuehne <thomas-dloop@kuehne.thisisspam.cn>
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
6 // @date@ 2004-10-22
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
7 // @uri@ news:clbr09$uc6$1@digitaldaemon.com
1487
6e4063f99377 changed nntp: URLs to http: URLs
thomask
parents: 1383
diff changeset
8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=2140
338
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
9
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
10 // invariant for structs allowed since dmd-0.119
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
11
736
1e6afb94ce6d updated meta data for Torture
thomask
parents: 338
diff changeset
12 // __DSTRESS_TORTURE_BLOCK__ -release
1e6afb94ce6d updated meta data for Torture
thomask
parents: 338
diff changeset
13
338
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
14 module dstress.run.invariant_04;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
15
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
16 bool tested;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
17
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
18 struct MyStruct{
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
19 int i=1;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
20
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
21 void test(){
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
22 }
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
23
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1487
diff changeset
24 invariant(){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1487
diff changeset
25 if(1 != i){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1487
diff changeset
26 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1487
diff changeset
27 }
338
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
28 tested=true;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
29 }
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
30 }
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
31
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
32 int main(){
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
33 MyStruct s;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
34 assert(!tested);
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
35 s.test();
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1487
diff changeset
36 if(!tested){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1487
diff changeset
37 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1487
diff changeset
38 }
338
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
39 return 0;
1f6cf5ccfbc9 1) updated rules to dmd-0.119
thomask
parents:
diff changeset
40 }