changeset 570:32f7f8ce5e51

updated "===" -> "is" and "!==" to "!(...===...)"
author thomask
date Wed, 08 Jun 2005 17:49:15 +0000
parents 15b52e26c8f4
children 7e8bf1090f62
files compile/bug_dsymbol_611_C.d nocompile/bug_dsymbol_611_B.d nocompile/bug_expression_661_A.d nocompile/ptr_05.d nocompile/ptr_06.d nocompile/ptr_07.d nocompile/ptr_08.d nocompile/ptr_09.d run/InExpression_11.d run/InExpression_12.d run/InExpression_13.d run/InExpression_19.d run/bug_20050407_01.d run/bug_20050407_02.d run/bug_20050407_03.d run/bug_cgcs_353_C.d run/bug_cgcs_353_D.d run/bug_e2ir_141_C.d run/cast_25.d run/cast_26.d run/cast_27.d run/init_03.d run/new_04.d run/o/opSlice_01_S.d run/o/opSlice_01_T.d run/opIdentity_01.d run/opIdentity_02.d run/ptr_03.d run/ptr_04.d run/sort_01.d run/sort_02.d run/typeid_82.d run/typeid_84.d run/typeid_85.d
diffstat 34 files changed, 48 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- a/compile/bug_dsymbol_611_C.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/compile/bug_dsymbol_611_C.d	Wed Jun 08 17:49:15 2005 +0000
@@ -16,7 +16,7 @@
 class BasicNode : INode{
 	INode findNode(){
 		foreach(INode c ; m_children){
-			if(c.owner !== this)
+			if(!(c.owner is this))
 				continue;
 			return null;
 		}
--- a/nocompile/bug_dsymbol_611_B.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/nocompile/bug_dsymbol_611_B.d	Wed Jun 08 17:49:15 2005 +0000
@@ -18,7 +18,7 @@
 class BasicNode : INode{
 	INode findNode(){
 		foreach(INode c ; m_children){
-			if(c.owner !== this)
+			if(!(c.owner is this))
 				continue;
 			return null;
 		}
--- a/nocompile/bug_expression_661_A.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/nocompile/bug_expression_661_A.d	Wed Jun 08 17:49:15 2005 +0000
@@ -14,6 +14,6 @@
 ulong[cast(uint)((cast(float)byte.sizeof/ulong.sizeof)-int.max>>2)+int.max>>2] hexarray;
 
 int main(){
-	assert(!(hexarray === null));
+	assert(!(hexarray is null));
 	return 0;
 }
--- a/nocompile/ptr_05.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/nocompile/ptr_05.d	Wed Jun 08 17:49:15 2005 +0000
@@ -9,7 +9,7 @@
 int main(){
 	Object[char[]] array;
 
-	assert(array.ptr === null);
+	assert(array.ptr is null);
 
 	return 0;
 }
--- a/nocompile/ptr_06.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/nocompile/ptr_06.d	Wed Jun 08 17:49:15 2005 +0000
@@ -9,7 +9,7 @@
 int main(){
 	Object* pointer;
 
-	assert(pointer.ptr === null);
+	assert(pointer.ptr is null);
 
 	return 0;
 }
--- a/nocompile/ptr_07.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/nocompile/ptr_07.d	Wed Jun 08 17:49:15 2005 +0000
@@ -9,7 +9,7 @@
 int main(){
 	Object** pointer;
 
-	assert(pointer.ptr === null);
+	assert(pointer.ptr is null);
 
 	return 0;
 }
--- a/nocompile/ptr_08.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/nocompile/ptr_08.d	Wed Jun 08 17:49:15 2005 +0000
@@ -9,7 +9,7 @@
 int main(){
 	int i;
 
-	assert(i.ptr === null);
+	assert(i.ptr is null);
 
 	return 0;
 }
--- a/nocompile/ptr_09.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/nocompile/ptr_09.d	Wed Jun 08 17:49:15 2005 +0000
@@ -9,7 +9,7 @@
 int main(){
 	int* i;
 
-	assert(i.ptr === null);
+	assert(i.ptr is null);
 
 	return 0;
 }
--- a/run/InExpression_11.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/InExpression_11.d	Wed Jun 08 17:49:15 2005 +0000
@@ -17,7 +17,7 @@
 	array[key]=value;
 	MyClass* ptr = "zwei" in array;
 	
-	assert(ptr === null);
+	assert(ptr is null);
 
 	return 0;
 }
--- a/run/InExpression_12.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/InExpression_12.d	Wed Jun 08 17:49:15 2005 +0000
@@ -17,7 +17,7 @@
 	array[key]=value;
 	MyStruct* ptr = "zwei" in array;
 	
-	assert(ptr === null);
+	assert(ptr is null);
 
 	return 0;
 }
--- a/run/InExpression_13.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/InExpression_13.d	Wed Jun 08 17:49:15 2005 +0000
@@ -12,7 +12,7 @@
 	array[key]=value;
 	int* ptr = "zwei" in array;
 	
-	assert(ptr === null);
+	assert(ptr is null);
 
 	return 0;
 }
--- a/run/InExpression_19.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/InExpression_19.d	Wed Jun 08 17:49:15 2005 +0000
@@ -9,7 +9,7 @@
 
 	void* ptr = "key" in array;
 
-	assert(ptr===null);
+	assert(ptr is null);
 
 	return 0;
 }
--- a/run/bug_20050407_01.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/bug_20050407_01.d	Wed Jun 08 17:49:15 2005 +0000
@@ -22,6 +22,6 @@
 	VecStack vm = new VecStack;
 	double[16] M;
 	vm.euler_to_matrix(M);
-	assert(vm!==null);
+	assert(!(vm is null));
 	return 0;
 }
--- a/run/bug_20050407_02.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/bug_20050407_02.d	Wed Jun 08 17:49:15 2005 +0000
@@ -22,6 +22,6 @@
 	VecStack vm = new VecStack;
 	double[] M;
 	vm.euler_to_matrix(M);
-	assert(vm!==null);
+	assert(!(vm is null));
 	return 0;
 }
--- a/run/bug_20050407_03.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/bug_20050407_03.d	Wed Jun 08 17:49:15 2005 +0000
@@ -18,6 +18,6 @@
 	VecStack vm = new VecStack;
 	double[16] M;
 	vm.quat_to_matrix(M);
-	assert(vm!==null);
+	assert(!(vm is null));
 	return 0;
 }
--- a/run/bug_cgcs_353_C.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/bug_cgcs_353_C.d	Wed Jun 08 17:49:15 2005 +0000
@@ -11,7 +11,7 @@
 
 struct MyStruct {
 	int opEquals(MyStruct x) {
-		return this.normalize === x.normalize;
+		return this.normalize is x.normalize;
 	}
 	
 	MyStruct normalize() {
--- a/run/bug_cgcs_353_D.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/bug_cgcs_353_D.d	Wed Jun 08 17:49:15 2005 +0000
@@ -13,7 +13,7 @@
 
 struct MyStruct {
 	int opEquals(MyStruct x) {
-		return this.normalize === x.normalize;
+		return this.normalize is x.normalize;
 	}
 	
 	MyStruct normalize() {
--- a/run/bug_e2ir_141_C.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/bug_e2ir_141_C.d	Wed Jun 08 17:49:15 2005 +0000
@@ -25,6 +25,6 @@
 	dummy = new MyClass();
 	MyClass c = new MyClass();
 	c.prop = true ? MyClass.prop : MyClass.prop;
-	assert(c.prop === dummy);
+	assert(c.prop is dummy);
 	return 0;
 }
--- a/run/cast_25.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/cast_25.d	Wed Jun 08 17:49:15 2005 +0000
@@ -13,6 +13,6 @@
 	char[] t="a";
 
 	s = (args.length>0) ? null : t;
-	assert(s===null);
+	assert(s is null);
 	return 0;
 }
--- a/run/cast_26.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/cast_26.d	Wed Jun 08 17:49:15 2005 +0000
@@ -13,6 +13,6 @@
 	char[] t="a";
 
 	s = (args.length>0) ? t : null;
-	assert(s===t);
+	assert(s is t);
 	return 0;
 }
--- a/run/cast_27.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/cast_27.d	Wed Jun 08 17:49:15 2005 +0000
@@ -13,6 +13,6 @@
 	char[] t="a";
 
 	s = (args.length>0) ? null : null;
-	assert(s===null);
+	assert(s is null);
 	return 0;
 }
--- a/run/init_03.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/init_03.d	Wed Jun 08 17:49:15 2005 +0000
@@ -11,7 +11,7 @@
 int main(){
         static int[4] array2 = [5,6,7,8];
         TypeInfo i = typeid(typeof(array2.init));
-	assert(i !== null);
+	assert(!(i is null));
 	return 0;
 }
 
--- a/run/new_04.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/new_04.d	Wed Jun 08 17:49:15 2005 +0000
@@ -17,7 +17,7 @@
 
 	new(size_t size, byte blah){
 		void* v=malloc(size);
-		if(v===null){
+		if(v is null){
 			throw new Exception(null);
 		}
 		a=blah;
--- a/run/o/opSlice_01_S.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/o/opSlice_01_S.d	Wed Jun 08 17:49:15 2005 +0000
@@ -16,14 +16,14 @@
 	
 	arr[1..2] = arr[0];
 	
-	assert(null===arr[0][0]);
-	assert(null!==arr[0][1]);
-	assert(null===arr[1][0]);
-	assert(null!==arr[1][1]);
-	assert(null===arr[2][0]);
-	assert(null!==arr[2][1]);
-	assert(null===arr[3][0]);
-	assert(null===arr[3][1]);
+	assert(null is arr[0][0]);
+	assert(!(null is arr[0][1]));
+	assert(null is arr[1][0]);
+	assert(!(null is arr[1][1]));
+	assert(null is arr[2][0]);
+	assert(!(null is arr[2][1]));
+	assert(null is arr[3][0]);
+	assert(null is arr[3][1]);
 
 	return 0;
 }
--- a/run/o/opSlice_01_T.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/o/opSlice_01_T.d	Wed Jun 08 17:49:15 2005 +0000
@@ -22,14 +22,14 @@
 	
 	arr[1..2] = arr[0];
 	
-	assert(null===arr[0][0]);
-	assert(null!==arr[0][1]);
-	assert(null===arr[1][0]);
-	assert(null!==arr[1][1]);
-	assert(null===arr[2][0]);
-	assert(null!==arr[2][1]);
-	assert(null===arr[3][0]);
-	assert(null===arr[3][1]);
+	assert(null is arr[0][0]);
+	assert(!(null is arr[0][1]));
+	assert(null is arr[1][0]);
+	assert(!(null is arr[1][1]));
+	assert(null is arr[2][0]);
+	assert(!(null is arr[2][1]));
+	assert(null is arr[3][0]);
+	assert(null is arr[3][1]);
 
 	return 0;
 }
--- a/run/opIdentity_01.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/opIdentity_01.d	Wed Jun 08 17:49:15 2005 +0000
@@ -41,6 +41,6 @@
  	J a = new B;
 	J b = new B;
 	a.addChild(b);
-	assert(b.parent === a);
+	assert(b.parent is a);
 	return 0;
 }
--- a/run/opIdentity_02.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/opIdentity_02.d	Wed Jun 08 17:49:15 2005 +0000
@@ -41,6 +41,6 @@
  	J a = new B;
 	J b = new B;
 	a.addChild(b);
-	assert(cast(J)b.parent === a);
+	assert(cast(J)b.parent is a);
 	return 0;
 }
--- a/run/ptr_03.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/ptr_03.d	Wed Jun 08 17:49:15 2005 +0000
@@ -8,7 +8,7 @@
 	Object[] array;
 	array.length=0;
 
-	assert(array.ptr === null);
+	assert(array.ptr is null);
 
 	return 0;
 }
--- a/run/ptr_04.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/ptr_04.d	Wed Jun 08 17:49:15 2005 +0000
@@ -7,7 +7,7 @@
 int main(){
 	Object[0] array;
 
-	assert(!(array.ptr === null));
+	assert(!(array.ptr is null));
 
 	return 0;
 }
--- a/run/sort_01.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/sort_01.d	Wed Jun 08 17:49:15 2005 +0000
@@ -24,7 +24,7 @@
 	assert(b[2]);
 	
 	assert(&a != &b);
-	assert(a.ptr === b.ptr);
+	assert(a.ptr is b.ptr);
 
 	return 0;
 }
--- a/run/sort_02.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/sort_02.d	Wed Jun 08 17:49:15 2005 +0000
@@ -36,7 +36,7 @@
 	assert(b[6]==byte.max);
 
 	assert(&a != &b);
-	assert(a.ptr === b.ptr);
+	assert(a.ptr is b.ptr);
 	
 	return 0;
 }
--- a/run/typeid_82.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/typeid_82.d	Wed Jun 08 17:49:15 2005 +0000
@@ -15,6 +15,6 @@
 	assert(!(t1 is null));
 	TypeInfo t2 = typeid(MyEnum);
 	assert(!(t2 is null));
-	assert(t1 === t2);
+	assert(t1 is t2);
 	return 0;
 }
--- a/run/typeid_84.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/typeid_84.d	Wed Jun 08 17:49:15 2005 +0000
@@ -11,7 +11,7 @@
 int main(){
 	alias byte function(int) func;
 	TypeInfo ti = typeid(func);
-	assert(ti !== null);
+	assert(!(ti is null));
 	assert(ti.tsize == func.sizeof);
 	assert(ti.toString() == "byte(int)*");
 	return 0;
--- a/run/typeid_85.d	Wed Jun 08 17:25:48 2005 +0000
+++ b/run/typeid_85.d	Wed Jun 08 17:49:15 2005 +0000
@@ -11,7 +11,7 @@
 int main(){
 	alias byte delegate(int) del;
 	TypeInfo ti = typeid(del);
-	assert(ti !== null);
+	assert(!(ti is null));
 	assert(ti.tsize == del.sizeof);
 	assert(ti.toString()=="byte delegate(int)");
 	return 0;