Mercurial > projects > dstress
changeset 1199:2341845c9184
[Issue 431] New: Invalid case selected when switching on a long
Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl>
2006-10-12
news:bug-431-3@http.d.puremagic.com/issues/
author | thomask |
---|---|
date | Sat, 21 Oct 2006 13:27:52 +0000 |
parents | f272d893dd3e |
children | 0ca7fb49ff2b |
files | run/c/case_04_A.d run/c/case_04_B.d |
diffstat | 2 files changed, 45 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/case_04_A.d Sat Oct 21 13:27:52 2006 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> +// @date@ 2006-10-12 +// @uri@ news:bug-431-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 431] New: Invalid case selected when switching on a long + +module dstress.run.c.case_04_A; + +int main() { + long foo = 4; + switch (foo) { + case 2: assert(false); break; + case 3: break; + case 4: break; + case 5: break; + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/case_04_B.d Sat Oct 21 13:27:52 2006 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> +// @date@ 2006-10-12 +// @uri@ news:bug-431-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 431] New: Invalid case selected when switching on a long + +module dstress.run.c.case_04_B; + +int main() { + long foo = 4; + switch (foo) { + case 2: assert(false); break; + case 3: assert(false); break; + case 4: break; + case 5: assert(false); break; + default: assert(false); + } + + return 0; +}