Browse Source

added compare methods

Nicolas Cannasse 15 years ago
parent
commit
4b9c9ea3f9
1 changed files with 10 additions and 0 deletions
  1. 10 0
      tests/unit/TestReflect.hx

+ 10 - 0
tests/unit/TestReflect.hx

@@ -177,4 +177,14 @@ class TestReflect extends Test {
 		exc( function() Type.createEnum(MyEnum,"Z",[]) );
 		exc( function() Type.createEnum(MyEnum,"Z",[]) );
 	}
 	}
 
 
+	function testCompare() {
+		var a = new MyClass(0);
+		var b = new MyClass(1);
+		t( Reflect.compareMethods(a.add,a.add) );
+		f( Reflect.compareMethods(a.add,b.add) );
+		f( Reflect.compareMethods(a.add,a.get) );
+		f( Reflect.compareMethods(a.add,null) );
+		f( Reflect.compareMethods(null,a.add) );
+	}
+
 }
 }