changeset 392:9faddc0de2ba

1) fixed meta data 2) evade dmd-0.118 loop code
author thomask
date Wed, 06 Apr 2005 18:56:06 +0000
parents 7fc991afefd1
children 097e3e3d1ddf
files nocompile/bounds_checking_02.d nocompile/super_06.d norun/delete_03.d norun/delete_04.d norun/delete_05.d norun/destructor_04.d run/constructor_11.d run/delete_09.d run/invariant_27.d run/invariant_28.d run/invariant_32.d
diffstat 11 files changed, 242 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- /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;
+}
--- 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 <thomas-dloop@kuehne.thisisspam.cn>
-// @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){
+	}
 }
--- 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;
 }
--- 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;
 }
--- 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;
 }
--- /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;
+}
--- /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;
+}
--- /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;
+}
--- /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;
+}
--- /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;
+}
--- /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;
+}