Mercurial > projects > dstress
view run/c/case_05_C.d @ 1597:8b9d4d2f925a
Fix typos in complex tests. See D bug 614.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 09 Sep 2008 16:53:58 +0200 |
parents | daef239f37cf |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Nazo Humei <lovesyao@hotmail.com> // @date@ 2006-11-25 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=596 // @desc@ [Issue 596] New: Support array, arrayliteral and struct in switch and case module dstress.run.c.case_05_C; int test(wchar[] s){ switch(s){ case [cast(wchar)'a', '2']: return 1; case [cast(wchar)'b']: return 3; default: return 4; } } int main(){ if(test("b") != 3){ assert(0); } if(test("a2") != 1){ assert(0); } if(test("abcd") != 4){ assert(0); } return 0; }