Mercurial > projects > dstress
annotate run/i/if_14_E.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_E; | |
10 | |
11 int test(int i){ | |
12 auto j = i * i; | |
13 if(j) | |
14 return j; | |
15 else | |
16 return 10; | |
17 } | |
18 | |
19 int main(){ | |
20 if(test(1) != 1){ | |
21 assert(0); | |
22 } | |
23 | |
24 if(test(0) != 10){ | |
25 assert(0); | |
26 } | |
27 | |
28 if(test(-3) != 9){ | |
29 assert(0); | |
30 } | |
31 | |
32 return 0; | |
33 } | |
34 |