annotate run/i/if_14_F.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
934
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
1 // $HeadURL$
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
2 // $Date$
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
3 // $Author$
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
4
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
5 // @author@ <godaves@yahoo.com>
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
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
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
8
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
9 module dstress.run.i.if_14_F;
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
10
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
11 int test(int i){
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
12 auto j = i * i;
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
13 if(j){
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
14 return j;
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
15 }else{
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
16 return 10;
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
17 }
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
18 }
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
19
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
20 int main(){
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
21 if(test(1) != 1){
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
22 assert(0);
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
23 }
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
24
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
25 if(test(0) != 10){
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
26 assert(0);
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
27 }
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
28
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
29 if(test(-3) != 9){
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
30 assert(0);
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
31 }
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
32
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
33 return 0;
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
34 }
5e597b3bfbca <godaves@yahoo.com>
thomask
parents:
diff changeset
35