Mercurial > projects > dstress
annotate run/o/odd_bug_08_A.d @ 1320:daef239f37cf
sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
author | thomask |
---|---|
date | Sun, 31 Dec 2006 19:59:08 +0000 |
parents | 08057f3259c9 |
children |
rev | line source |
---|---|
1127 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ sugiyama <sugiyama563@msn.com> | |
6 // @date@ 2006-09-06 | |
1320
daef239f37cf
sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
1127
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=326 |
1127 | 8 // @desc@ [Issue 326] New: calculation bug |
9 | |
10 module dstress.run.o.odd_bug_08_A; | |
11 | |
12 void check(int i){ | |
13 static int expected = 1; | |
14 | |
15 if(i != expected){ | |
16 assert(0); | |
17 } | |
18 | |
19 expected++; | |
20 } | |
21 | |
22 int main() { | |
23 int x = 2, y = 1; | |
24 | |
25 int res = 0; | |
26 for(int i = 0; i < 10; i++) { | |
27 res = res + x - y; | |
28 check(res); | |
29 } | |
30 | |
31 return 0; | |
32 } | |
33 | |
34 |