浏览代码

Update TestCase.hx

currently assertTrue succeeds if b is null
AndrewVernon 10 年之前
父节点
当前提交
c4353ed3bd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      std/haxe/unit/TestCase.hx

+ 1 - 1
std/haxe/unit/TestCase.hx

@@ -42,7 +42,7 @@ class TestCase #if mt_build implements mt.Protect #end {
 
 	function assertTrue( b:Bool, ?c : PosInfos ) : Void {
 		currentTest.done = true;
-		if (b == false){
+		if (b != true){
 			currentTest.success = false;
 			currentTest.error   = "expected true but was false";
 			currentTest.posInfos = c;