Mercurial > projects > dstress
view run/i/if_14_E.d @ 934:5e597b3bfbca
<godaves@yahoo.com>
2006-03-26
news:bug-74-3@http.d.puremagic.com/bugzilla/
author | thomask |
---|---|
date | Sun, 26 Mar 2006 10:22:58 +0000 |
parents | |
children | 81222734adf3 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ <godaves@yahoo.com> // @date@ 2006-03-26 // @uri@ news:bug-74-3@http.d.puremagic.com/bugzilla/ module dstress.run.i.if_14_E; int test(int i){ auto j = i * i; if(j) return j; else return 10; } int main(){ if(test(1) != 1){ assert(0); } if(test(0) != 10){ assert(0); } if(test(-3) != 9){ assert(0); } return 0; }