Mercurial > projects > dstress
changeset 886:976d6a6a7907
div. C++ porting tests
author | thomask |
---|---|
date | Sat, 04 Mar 2006 11:02:26 +0000 |
parents | db221d4acc19 |
children | c1c995d2ea6f |
files | nocompile/c/catch_07.d nocompile/c/const_35_A.d nocompile/c/const_35_B.d nocompile/c/const_35_C.d nocompile/c/const_35_D.d nocompile/e/enum_45.d nocompile/i/if_10_A.d nocompile/i/if_10_B.d nocompile/i/if_10_C.d nocompile/i/if_10_D.d nocompile/i/if_10_E.d nocompile/t/throw_06.d run/i/if_10_F.d |
diffstat | 13 files changed, 204 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/c/catch_07.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,17 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// Porting: C++ + +// __DSTRESS_ELINE__ 14 + +module dstess.nocmpile.c.catch_07; + +void main(){ + try{ + throw new Exception("msg"); + }catch(...){ + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/c/const_35_A.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,19 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// Porting: C++ + +// __DSTRESS_ELINE__ 17 + +module dstess.nocompile.c.const_35_A; + +struct S{ + int i; + + void foo(int i){ + } + + void bar(int i) const{ + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/c/const_35_B.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// Porting: C++ + +// __DSTRESS_ELINE__ 11 + +module dstess.nocompile.c.const_35_B; + +void dummy(const char* c){ +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/c/const_35_C.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// Porting: C++ + +// __DSTRESS_ELINE__ 11 + +module dstess.nocompile.c.const_35_C; + +void dummy(char* const c){ +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/c/const_35_D.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// Porting: C++ + +// __DSTRESS_ELINE__ 11 + +module dstess.nocompile.c.const_35_D; + +void dummy(char const* c){ +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/e/enum_45.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// Porting: C++ + +// __DSTRESS_ELINE__ 18 + +module dstess.nocompile.e.enum_45; + +enum E{ + A = 1, + B = 2 +} + +int test(E e){ + switch(e){ + case B: + return 2; + default: + return 0; + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/i/if_10_A.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,13 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 10 + +module dstess.nocompile.i.if_10_A; + +void test(int i){ + if(if(i != 0)){ + i++; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/i/if_10_B.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,13 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 10 + +module dstess.nocompile.i.if_10_B; + +void test(int i){ + if if i != 0{ + i++; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/i/if_10_C.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 10 + +module dstess.nocompile.i.if_10_C; + +void test(int i){ + if if i != 0 + i++; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/i/if_10_D.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 10 + +module dstess.nocompile.i.if_10_E; + +void test(int i){ + if ( if i != 0 ) + i++; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/i/if_10_E.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 10 + +module dstess.nocompile.i.if_10_E; + +int test(int i){ + if i-- + if !i + return 4; + return 5; + return 6; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/t/throw_06.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,14 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// Porting: C++ + +// __DSTRESS_ELINE__ 12 + +module dstess.nocmpile.t.throw_06; + +void main(){ + throw; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/i/if_10_F.d Sat Mar 04 11:02:26 2006 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstess.run.i.if_10_F; + +int test(int i){ + if (i--) + if (!i) + return 4; + return 5; + return 6; +} + +int main(){ + if(test(1) != 4){ + assert(0); + } + + if(test(2) != 5){ + assert(0); + } + + if(test(0) != 5){ + assert(0); + } + + return 0; +}