Mercurial > projects > dstress
annotate run/i/if_14_A.d @ 1319:81222734adf3
sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
author | thomask |
---|---|
date | Sun, 31 Dec 2006 19:58:06 +0000 |
parents | 5e597b3bfbca |
children |
rev | line source |
---|---|
934 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <godaves@yahoo.com> | |
6 // @date@ 2006-03-26 | |
1319
81222734adf3
sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
934
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=74 |
934 | 8 |
9 module dstress.run.i.if_14_A; | |
10 | |
11 int test(int i){ | |
12 if(int j = i * i) | |
13 return j; | |
14 else | |
15 return 10; | |
16 } | |
17 | |
18 int main(){ | |
19 if(test(1) != 1){ | |
20 assert(0); | |
21 } | |
22 | |
23 if(test(0) != 10){ | |
24 assert(0); | |
25 } | |
26 | |
27 if(test(-3) != 9){ | |
28 assert(0); | |
29 } | |
30 | |
31 return 0; | |
32 } | |
33 |