# HG changeset patch # User thomask # Date 1112813766 0 # Node ID 9faddc0de2ba515e10e1feefb8913513e885c049 # Parent 7fc991afefd1a5fa040e552177c8e151ee634d9d 1) fixed meta data 2) evade dmd-0.118 loop code diff -r 7fc991afefd1 -r 9faddc0de2ba nocompile/bounds_checking_02.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/bounds_checking_02.d Wed Apr 06 18:56:06 2005 +0000 @@ -0,0 +1,14 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 11 + +module dstress.nocompile.bounds_checking_02; + +int main(){ + byte[5] a; + a[-1]=3; + + return 0; +} diff -r 7fc991afefd1 -r 9faddc0de2ba nocompile/super_06.d --- a/nocompile/super_06.d Wed Apr 06 18:30:47 2005 +0000 +++ b/nocompile/super_06.d Wed Apr 06 18:56:06 2005 +0000 @@ -2,24 +2,16 @@ // $Date$ // $Base$ -// @author@ Thomas Kuehne -// @date@ 200-12-10 -// @uri@ news:sr8p82-lu3.ln1@kuehne.cn -// @url@ nntp://digitalmars.com/digitalmars.D.bugs/2528 - -// Object has no constructor - -// __DSTRESS_ELINE__ 18 +// __DSTRESS_ELINE__ 15 module dstress.nocompile.super_06; -class MyClass : Object{ - this(){ - super(); +class Parent{ + this(int i){ } } -int main(){ - MyClass o = new MyClass(); - return 0; +class Child : Parent{ + this(char[] c){ + } } diff -r 7fc991afefd1 -r 9faddc0de2ba norun/delete_03.d --- a/norun/delete_03.d Wed Apr 06 18:30:47 2005 +0000 +++ b/norun/delete_03.d Wed Apr 06 18:56:06 2005 +0000 @@ -2,17 +2,27 @@ // $Date$ // $Author$ -// __DSTRESS_ELINE__ 11 +// @WARNING@ direct access to Phobos's GC + +// __DSTRESS_ELINE__ 15 module dstress.run.delete_03; +import std.gc; + struct MyStruct{ delete(void* p){ assert(0); } } +void test(){ + MyStruct t; +} + int main(){ - MyStruct t; + test(); + std.gc.fullCollect(); + std.gc.minimize(); return 0; } diff -r 7fc991afefd1 -r 9faddc0de2ba norun/delete_04.d --- a/norun/delete_04.d Wed Apr 06 18:30:47 2005 +0000 +++ b/norun/delete_04.d Wed Apr 06 18:56:06 2005 +0000 @@ -2,17 +2,28 @@ // $Date$ // $Author$ -// __DSTRESS_ELINE__ 11 +// @WARNING@ direct access to Phobos's GC + +// __DSTRESS_ELINE__ 15 module dstress.run.delete_04; +import std.gc; + class MyClass{ delete(void* p){ assert(0); } } +void test(){ + MyClass t = new MyClass(); + delete t; +} + int main(){ - MyClass o=new MyClass(); + test(); + std.gc.fullCollect(); + std.gc.minimize(); return 0; } diff -r 7fc991afefd1 -r 9faddc0de2ba norun/delete_05.d --- a/norun/delete_05.d Wed Apr 06 18:30:47 2005 +0000 +++ b/norun/delete_05.d Wed Apr 06 18:56:06 2005 +0000 @@ -2,17 +2,27 @@ // $Date$ // $Author$ -// __DSTRESS_ELINE__ 11 +// @WARNING@ direct access to Phobos's GC + +// __DSTRESS_ELINE__ 15 module dstress.run.delete_05; +import std.gc; + union MyUnion{ delete(void* p){ assert(0); } } +void test(){ + MyUnion t; +} + int main(){ - MyUnion u; + test(); + std.gc.fullCollect(); + std.gc.minimize(); return 0; } diff -r 7fc991afefd1 -r 9faddc0de2ba norun/destructor_04.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/norun/destructor_04.d Wed Apr 06 18:56:06 2005 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 10 + +module dstress.norun.destructor_04; + +static ~this(){ + assert(0); +} + +int main(){ + return 0; +} diff -r 7fc991afefd1 -r 9faddc0de2ba run/constructor_11.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/constructor_11.d Wed Apr 06 18:56:06 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.constructor_11; + +int status; + +static this(){ + assert(status==0); + status++; +} + +int main(){ + assert(status==1); + return 0; +} diff -r 7fc991afefd1 -r 9faddc0de2ba run/delete_09.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/delete_09.d Wed Apr 06 18:56:06 2005 +0000 @@ -0,0 +1,33 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.delete_09; + +class Int{ + this(int i){ + this.i = i; + } + int i; +} + +int main(){ + Int[char[]] array; + Int a = new Int(1); + array["eins"]=a; + + Int b = new Int(2); + array["zwei"]=b; + + Int c = new Int(3); + array["drei"]=c; + + assert(("zwei" in array)!==null); + + delete array["zwei"]; + + assert(("zwei" in array)===null); + assert(b!==null); + + return 0; +} diff -r 7fc991afefd1 -r 9faddc0de2ba run/invariant_27.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/invariant_27.d Wed Apr 06 18:56:06 2005 +0000 @@ -0,0 +1,48 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.invariant_27; + +int status; +int inv; + +class MyClass{ + + this(){ + } + + public static void check(){ + status++; + } + + private void middle(){ + check(); + } + + invariant{ + middle(); + inv++; + } +} + +int main(){ + + MyClass o; + assert(status==0); + assert(inv==0); + + o=new MyClass(); + assert(status==1); + assert(inv==1); + + o.check(); + assert(status==2); + assert(inv==1); + + MyClass.check(); + assert(status==3); + assert(inv==1); + + return 0; +} diff -r 7fc991afefd1 -r 9faddc0de2ba run/invariant_28.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/invariant_28.d Wed Apr 06 18:56:06 2005 +0000 @@ -0,0 +1,44 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.invariant_28; + +int status; +int inv; + +class MyClass{ + + this(){ + } + + public static void check(){ + status++; + } + + invariant{ + check(); + inv++; + } +} + +int main(){ + + MyClass o; + assert(status==0); + assert(inv==0); + + o=new MyClass(); + assert(status==1); + assert(inv==1); + + o.check(); + assert(status==2); + assert(inv==1); + + MyClass.check(); + assert(status==3); + assert(inv==1); + + return 0; +} diff -r 7fc991afefd1 -r 9faddc0de2ba run/invariant_32.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/invariant_32.d Wed Apr 06 18:56:06 2005 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.invariant_32; + +int status; + +class MyClass{ + + ~this(){ + assert(status==1); + status++; + } + + invariant{ + assert(status==0); + status++; + } +} + +int main(){ + MyClass c = new MyClass(); + delete c; + assert(status==2); + + return 0; +}