Explorar el Código

[wip] Use utest for our unit tests (#7901)

* [tests] start porting unit tests to utest

* [tests] more conditional repositioning

* [tests] cleanup

* [tests] reduce spamfest

* [tests] noAssert all the things

* no spamfest

* [tests] dodge literally $hiter on neko

* [tests] one more noAssert

* [as3] fix `@:public` vs. override

* [tests] just assume success for now

* [tests] dodge dodgy utest printing behavior

* [tests] remove nodejsMain

utest exits for us

* [tests] test with new utest printing approach

* [tests] revert literally $hiter fix

* [tests] it's official

* [tests] dodge cppia problem
Simon Krajewski hace 6 años
padre
commit
02279f7506
Se han modificado 100 ficheros con 160 adiciones y 355 borrados
  1. 1 0
      .gitignore
  2. 14 0
      src/core/type.ml
  3. 3 0
      src/generators/genas3.ml
  4. 1 1
      tests/RunCi.hx
  5. 0 1
      tests/runci/targets/Cpp.hx
  6. 0 1
      tests/runci/targets/Cs.hx
  7. 2 2
      tests/runci/targets/Flash.hx
  8. 0 1
      tests/runci/targets/Java.hx
  9. 1 2
      tests/runci/targets/Js.hx
  10. 0 1
      tests/runci/targets/Lua.hx
  11. 0 2
      tests/runci/targets/Macro.hx
  12. 0 1
      tests/runci/targets/Neko.hx
  13. 0 1
      tests/runci/targets/Php.hx
  14. 0 1
      tests/runci/targets/Python.hx
  15. 1 0
      tests/unit/compile-each.hxml
  16. 26 230
      tests/unit/src/unit/Test.hx
  17. 3 9
      tests/unit/src/unit/TestArrowFunctions.hx
  18. 1 1
      tests/unit/src/unit/TestBasetypes.hx
  19. 1 3
      tests/unit/src/unit/TestBytes.hx
  20. 1 0
      tests/unit/src/unit/TestGeneric.hx
  21. 0 2
      tests/unit/src/unit/TestIO.hx
  22. 1 5
      tests/unit/src/unit/TestInt64.hx
  23. 10 47
      tests/unit/src/unit/TestMain.hx
  24. 1 0
      tests/unit/src/unit/TestNaN.hx
  25. 2 0
      tests/unit/src/unit/TestPython.hx
  26. 0 5
      tests/unit/src/unit/TestReflect.hx
  27. 0 1
      tests/unit/src/unit/TestSerialize.hx
  28. 1 2
      tests/unit/src/unit/TestSerializerCrossTarget.hx
  29. 1 0
      tests/unit/src/unit/TestType.hx
  30. 0 1
      tests/unit/src/unit/TestXML.hx
  31. 3 1
      tests/unit/src/unit/hxcpp_issues/Issue192.hx
  32. 1 1
      tests/unit/src/unit/issues/Issue1810.hx
  33. 1 1
      tests/unit/src/unit/issues/Issue2085.hx
  34. 2 0
      tests/unit/src/unit/issues/Issue2224.hx
  35. 1 0
      tests/unit/src/unit/issues/Issue2236.hx
  36. 1 0
      tests/unit/src/unit/issues/Issue2581.hx
  37. 1 0
      tests/unit/src/unit/issues/Issue2648.hx
  38. 4 1
      tests/unit/src/unit/issues/Issue2750.hx
  39. 0 3
      tests/unit/src/unit/issues/Issue2754.hx
  40. 1 0
      tests/unit/src/unit/issues/Issue2881.hx
  41. 1 0
      tests/unit/src/unit/issues/Issue2951.hx
  42. 1 0
      tests/unit/src/unit/issues/Issue2957.hx
  43. 1 0
      tests/unit/src/unit/issues/Issue2960.hx
  44. 1 0
      tests/unit/src/unit/issues/Issue2980.hx
  45. 1 0
      tests/unit/src/unit/issues/Issue2989.hx
  46. 1 0
      tests/unit/src/unit/issues/Issue3005.hx
  47. 1 0
      tests/unit/src/unit/issues/Issue3008.hx
  48. 1 0
      tests/unit/src/unit/issues/Issue3024.hx
  49. 1 0
      tests/unit/src/unit/issues/Issue3084.hx
  50. 1 0
      tests/unit/src/unit/issues/Issue3090.hx
  51. 1 0
      tests/unit/src/unit/issues/Issue3132.hx
  52. 1 0
      tests/unit/src/unit/issues/Issue3133.hx
  53. 1 0
      tests/unit/src/unit/issues/Issue3138.hx
  54. 2 4
      tests/unit/src/unit/issues/Issue3345.hx
  55. 1 0
      tests/unit/src/unit/issues/Issue3383.hx
  56. 2 2
      tests/unit/src/unit/issues/Issue3388.hx
  57. 1 0
      tests/unit/src/unit/issues/Issue3390.hx
  58. 1 0
      tests/unit/src/unit/issues/Issue3400.hx
  59. 2 2
      tests/unit/src/unit/issues/Issue3451.hx
  60. 1 0
      tests/unit/src/unit/issues/Issue3480.hx
  61. 1 0
      tests/unit/src/unit/issues/Issue3486.hx
  62. 1 0
      tests/unit/src/unit/issues/Issue3528.hx
  63. 3 1
      tests/unit/src/unit/issues/Issue3545.hx
  64. 1 0
      tests/unit/src/unit/issues/Issue3547.hx
  65. 1 1
      tests/unit/src/unit/issues/Issue3615.hx
  66. 1 0
      tests/unit/src/unit/issues/Issue3639.hx
  67. 1 0
      tests/unit/src/unit/issues/Issue3713.hx
  68. 2 2
      tests/unit/src/unit/issues/Issue3771.hx
  69. 1 0
      tests/unit/src/unit/issues/Issue3777.hx
  70. 1 0
      tests/unit/src/unit/issues/Issue3781.hx
  71. 1 0
      tests/unit/src/unit/issues/Issue3804.hx
  72. 2 6
      tests/unit/src/unit/issues/Issue3826.hx
  73. 1 0
      tests/unit/src/unit/issues/Issue3844.hx
  74. 2 2
      tests/unit/src/unit/issues/Issue3846.hx
  75. 1 0
      tests/unit/src/unit/issues/Issue3894.hx
  76. 2 0
      tests/unit/src/unit/issues/Issue3935.hx
  77. 2 2
      tests/unit/src/unit/issues/Issue3979.hx
  78. 2 2
      tests/unit/src/unit/issues/Issue4051.hx
  79. 1 0
      tests/unit/src/unit/issues/Issue4076.hx
  80. 1 0
      tests/unit/src/unit/issues/Issue4086.hx
  81. 1 0
      tests/unit/src/unit/issues/Issue4149.hx
  82. 1 0
      tests/unit/src/unit/issues/Issue4222.hx
  83. 2 2
      tests/unit/src/unit/issues/Issue4232.hx
  84. 1 0
      tests/unit/src/unit/issues/Issue4246.hx
  85. 1 0
      tests/unit/src/unit/issues/Issue4310.hx
  86. 1 0
      tests/unit/src/unit/issues/Issue4329.hx
  87. 1 0
      tests/unit/src/unit/issues/Issue4343.hx
  88. 1 0
      tests/unit/src/unit/issues/Issue4397.hx
  89. 1 0
      tests/unit/src/unit/issues/Issue4457.hx
  90. 1 0
      tests/unit/src/unit/issues/Issue4501.hx
  91. 1 0
      tests/unit/src/unit/issues/Issue4591.hx
  92. 1 0
      tests/unit/src/unit/issues/Issue4644.hx
  93. 1 0
      tests/unit/src/unit/issues/Issue4672.hx
  94. 1 0
      tests/unit/src/unit/issues/Issue4703.hx
  95. 2 0
      tests/unit/src/unit/issues/Issue4751.hx
  96. 1 0
      tests/unit/src/unit/issues/Issue4843.hx
  97. 2 2
      tests/unit/src/unit/issues/Issue4878.hx
  98. 1 0
      tests/unit/src/unit/issues/Issue4918.hx
  99. 1 0
      tests/unit/src/unit/issues/Issue4949.hx
  100. 1 0
      tests/unit/src/unit/issues/Issue4986.hx

+ 1 - 0
.gitignore

@@ -118,3 +118,4 @@ tests/sourcemaps/bin
 tests/benchs/export/
 tests/benchs/dump/
 tests/display/.unittest/
+tests/unit/.unittest/

+ 14 - 0
src/core/type.ml

@@ -2986,6 +2986,20 @@ module TClass = struct
 
 	let get_all_fields c tl =
 		get_member_fields' true c tl
+
+	let get_overridden_fields c cf =
+		let rec loop acc c = match c.cl_super with
+			| None ->
+				acc
+			| Some(c,_) ->
+				begin try
+					let cf' = PMap.find cf.cf_name c.cl_fields in
+					loop (cf' :: acc) c
+				with Not_found ->
+					loop acc c
+				end
+		in
+		loop [] c
 end
 
 let s_class_path c =

+ 3 - 0
src/generators/genas3.ml

@@ -996,10 +996,13 @@ let generate_field ctx static f =
 			print ctx "]";
 		| _ -> ()
 	) f.cf_meta;
+	let cfl_overridden = TClass.get_overridden_fields ctx.curclass f in
+	let overrides_public = List.exists (fun cf -> Meta.has Meta.Public cf.cf_meta) cfl_overridden in
 	let public = (has_class_field_flag f CfPublic) || Hashtbl.mem ctx.get_sets (f.cf_name,static) || (f.cf_name = "main" && static)
 		|| f.cf_name = "resolve" || Meta.has Meta.Public f.cf_meta
 		(* consider all abstract methods public to avoid issues with inlined private access *)
 	    || (match ctx.curclass.cl_kind with KAbstractImpl _ -> true | _ -> false)
+		|| overrides_public
 	in
 	let rights = (if static then "static " else "") ^ (if public then "public" else "protected") in
 	let p = ctx.curclass.cl_pos in

+ 1 - 1
tests/RunCi.hx

@@ -43,7 +43,7 @@ class RunCi {
 			var success = true;
 			try {
 				changeDirectory(unitDir);
-
+				haxelibInstallGit("Simn", "utest", "cppia_dodge");
 
 				var args = switch (ci) {
 					case TravisCI:

+ 0 - 1
tests/runci/targets/Cpp.hx

@@ -65,7 +65,6 @@ class Cpp {
 		}
 
 		changeDirectory(sysDir);
-		haxelibInstall("utest");
 		runCommand("haxe", ["compile-cpp.hxml"]);
 		runCpp("bin/cpp/Main-debug", []);
 

+ 0 - 1
tests/runci/targets/Cs.hx

@@ -69,7 +69,6 @@ class Cs {
 		runCs("bin/cs/bin/TestMain-Debug.exe");
 
 		changeDirectory(sysDir);
-		haxelibInstall("utest");
 		runCommand("haxe", ["compile-cs.hxml",'-D','fast_cast']);
 		runCs("bin/cs/bin/Main-Debug.exe", []);
 

+ 2 - 2
tests/runci/targets/Flash.hx

@@ -99,8 +99,8 @@ class Flash {
 			try {
 				line = traceProcess.stdout.readLine();
 				Sys.println(line);
-				if (line.indexOf("SUCCESS: ") >= 0) {
-					return line.indexOf("SUCCESS: true") >= 0;
+				if (line.indexOf("success: ") >= 0) {
+					return line.indexOf("success: true") >= 0;
 				}
 			} catch (e:haxe.io.Eof) {
 				break;

+ 0 - 1
tests/runci/targets/Java.hx

@@ -20,7 +20,6 @@ class Java {
 		runCommand("java", ["-jar", "bin/java/TestMain-Debug.jar"]);
 
 		changeDirectory(sysDir);
-		haxelibInstall("utest");
 		runCommand("haxe", ["compile-java.hxml"]);
 		runCommand("java", ["-jar", "bin/java/Main-Debug.jar"]);
 

+ 1 - 2
tests/runci/targets/Js.hx

@@ -48,7 +48,7 @@ class Js {
 				}
 				FileSystem.rename("bin/unit.js", output);
 				FileSystem.rename("bin/unit.js.map", output + ".map");
-				runCommand("node", ["-e", "require('./" + output + "').unit.TestMain.nodejsMain();"]);
+				runCommand("node", ["-e", "require('./" + output + "').unit.TestMain.main();"]);
 				output;
 			}
 		];
@@ -93,7 +93,6 @@ class Js {
 		infoMsg("Test optimization:");
 		changeDirectory(optDir);
 		runCommand("haxe", ["run.hxml"]);
-		haxelibInstall("utest");
 
 		runci.targets.Java.getJavaDependencies(); // this is awkward
 		changeDirectory(serverDir);

+ 0 - 1
tests/runci/targets/Lua.hx

@@ -66,7 +66,6 @@ class Lua {
 			runCommand("lua", ["bin/unit.lua"]);
 
 			changeDirectory(sysDir);
-			haxelibInstall("utest");
 			runCommand("haxe", ["compile-lua.hxml"].concat(args));
 			runCommand("lua", ["bin/lua/sys.lua"]);
 

+ 0 - 2
tests/runci/targets/Macro.hx

@@ -10,8 +10,6 @@ class Macro {
 	static public function run(args:Array<String>) {
 		runCommand("haxe", ["compile-macro.hxml"].concat(args));
 
-		haxelibInstall("utest");
-
 		// TODO: enable this again at some point
 		// changeDirectory(displayDir);
 		// runCommand("haxe", ["build.hxml"]);

+ 0 - 1
tests/runci/targets/Neko.hx

@@ -10,7 +10,6 @@ class Neko {
 		runCommand("neko", ["bin/unit.n"]);
 
 		changeDirectory(sysDir);
-		haxelibInstall("utest");
 		runCommand("haxe", ["compile-neko.hxml"]);
 		runCommand("neko", ["bin/neko/sys.n"]);
 	}

+ 0 - 1
tests/runci/targets/Php.hx

@@ -34,7 +34,6 @@ class Php {
 		runCommand("php", ["bin/php/index.php"]);
 
 		changeDirectory(sysDir);
-		haxelibInstall("utest");
 		runCommand("haxe", ["compile-php.hxml"]);
 		runCommand("php", ["bin/php/Main/index.php"]);
 	}

+ 0 - 1
tests/runci/targets/Python.hx

@@ -63,7 +63,6 @@ class Python {
 		}
 
 		changeDirectory(sysDir);
-		haxelibInstall("utest");
 		runCommand("haxe", ["compile-python.hxml"]);
 		for (py in pys) {
 			runCommand(py, ["bin/python/sys.py"]);

+ 1 - 0
tests/unit/compile-each.hxml

@@ -6,5 +6,6 @@
 --resource res2.bin@re/s?!%[]))("'1.bin
 --resource serializedValues.txt
 --dce full
+-lib utest
 -D analyzer-optimize
 -D analyzer-user-var-fusion

+ 26 - 230
tests/unit/src/unit/Test.hx

@@ -1,5 +1,7 @@
 package unit;
 
+import utest.Assert;
+
 #if (!macro && emscripten)
 import cpp.link.StaticStd;
 import cpp.link.StaticRegexp;
@@ -11,274 +13,68 @@ import cpp.link.StaticZlib;
 #if as3
 @:publicFields
 #end
-class Test {
+class Test implements utest.ITest {
 
 	public function new() {
 	}
 
-	//static var out = sys.io.File.write("debug.txt", false);
-
-	static inline function incrCount(?pos:haxe.PosInfos) {
-		++count;
-		//out.writeString(pos.methodName +":" +pos.lineNumber + "\n");
+	function eq<T>( v : T, v2 : T, ?pos:haxe.PosInfos ) {
+		Assert.equals(v, v2, pos);
 	}
 
-	function eq<T>( v : T, v2 : T, ?pos ) {
-		incrCount(pos);
-		if( v != v2 ) {
-			report(Std.string(v)+" should be "+Std.string(v2),pos);
-			success = false;
-		}
-	}
-
-	function feq( v : Float, v2 : Float, ?pos ) {
-		incrCount(pos);
-		if (!Math.isFinite(v) || !Math.isFinite(v2))
-			eq(v, v2, pos);
-		else if ( Math.abs(v - v2) > 1e-10 ) {
-			report(v+" should be "+v2,pos);
-			success = false;
-		}
+	function feq( v : Float, v2 : Float, ?pos:haxe.PosInfos ) {
+		Assert.floatEquals(v, v2, pos);
 	}
 
 	function aeq<T>(expected:Array<T>, actual:Array<T>, ?pos:haxe.PosInfos) {
-		if (expected.length != actual.length) {
-			report('Array length differs (${actual.length} should be ${expected.length})', pos);
-			success = false;
-		} else {
-			for (i in 0...expected.length) {
-				if (expected[i] != actual[i]) {
-					report('[${i}] ${actual[i]} should be ${expected[i]}', pos);
-					success = false;
-				}
-			}
-		}
+		Assert.same(expected, actual, pos);
 	}
 
-	function t( v, ?pos ) {
-		eq(v,true,pos);
+	function t( v, ?pos:haxe.PosInfos ) {
+		Assert.isTrue(v, pos);
 	}
 
-	function f( v, ?pos ) {
-		eq(v,false,pos);
+	function f( v, ?pos:haxe.PosInfos ) {
+		Assert.isFalse(v, pos);
 	}
 
-	function assert( ?pos ) {
-		report("Assert",pos);
-		success = false;
+	function assert(?message:String, ?pos:haxe.PosInfos ) {
+		Assert.fail(message, pos);
 	}
 
-	function exc( f : Void -> Void, ?pos ) {
-		incrCount(pos);
-		try {
-			f();
-			report("No exception occurred",pos);
-			success = false;
-		} catch( e : Dynamic ) {
-		}
+	function exc( f : Void -> Void, ?pos:haxe.PosInfos ) {
+		Assert.raises(f, pos);
 	}
 
 	function unspec( f : Void -> Void, ?pos ) {
-		incrCount(pos);
 		try {
 			f();
 		} catch( e : Dynamic ) {
 		}
+		noAssert();
 	}
 
 	function allow<T>( v : T, values : Array<T>, ?pos ) {
-		incrCount(pos);
-		for( v2 in values )
-			if( v == v2 )
-				return;
-		report(v+" not in "+Std.string(values),pos);
-		success = false;
+		Assert.contains(v, values, pos);
+	}
+
+	function noAssert(?pos:haxe.PosInfos) {
+		t(true, pos);
 	}
 
 	function hf(c:Class<Dynamic>, n:String, ?pos:haxe.PosInfos) {
-		Test.incrCount(pos);
-		if (!Lambda.has(Type.getInstanceFields(c), n)) {
-			Test.report(Type.getClassName(c) + " should have member field " +n, pos);
-			success = false;
-		}
+		t(Lambda.has(Type.getInstanceFields(c), n));
 	}
 
 	function nhf(c:Class<Dynamic>, n:String, ?pos:haxe.PosInfos) {
-		Test.incrCount(pos);
-		if (Lambda.has(Type.getInstanceFields(c), n)) {
-			Test.report(Type.getClassName(c) + " should not have member field " +n, pos);
-			success = false;
-		}
+		f(Lambda.has(Type.getInstanceFields(c), n));
 	}
 
 	function hsf(c:Class<Dynamic> , n:String, ?pos:haxe.PosInfos) {
-		Test.incrCount(pos);
-		if (!Lambda.has(Type.getClassFields(c), n)) {
-			Test.report(Type.getClassName(c) + " should have static field " +n, pos);
-			success = false;
-		}
+		t(Lambda.has(Type.getClassFields(c), n));
 	}
 
 	function nhsf(c:Class<Dynamic> , n:String, ?pos:haxe.PosInfos) {
-		Test.incrCount(pos);
-		if (Lambda.has(Type.getClassFields(c), n)) {
-			Test.report(Type.getClassName(c) + " should not have static field " +n, pos);
-			success = false;
-		}
-	}
-
-	function infos( m : String ) {
-		reportInfos = m;
-	}
-
-	function async<Args,T>( f : Args -> (T -> Void) -> Void, args : Args, v : T, ?pos : haxe.PosInfos ) : Void {
-		if( asyncWaits.length >= AMAX ) {
-			asyncCache.push(async.bind(f,args,v,pos));
-			return;
-		}
-		asyncWaits.push(pos);
-		f(args,function(v2) {
-			incrCount(pos);
-			if( !asyncWaits.remove(pos) ) {
-				report("Double async result",pos);
-				success = false;
-				return;
-			}
-			if( v != v2 ) {
-				report(v2+" should be "+v,pos);
-				success = false;
-			}
-			checkDone();
-		});
-	}
-
-	function asyncExc<Args>( seterror : (Dynamic -> Void) -> Void, f : Args -> (Dynamic -> Void) -> Void, args : Args, ?pos : haxe.PosInfos ) : Void {
-		if( asyncWaits.length >= AMAX ) {
-		asyncCache.push(asyncExc.bind(seterror,f,args,pos));
-			return;
-		}
-		asyncWaits.push(pos);
-		seterror(function(_) {
-			incrCount(pos);
-			if( asyncWaits.remove(pos) )
-				checkDone();
-			else {
-				report("Multiple async events",pos);
-				success = false;
-			}
-		});
-		f(args,function(_) {
-			incrCount(pos);
-			if( asyncWaits.remove(pos) ) {
-				report("No exception occurred",pos);
-				success = false;
-				checkDone();
-			} else {
-				report("Multiple async events",pos);
-				success = false;
-			}
-		});
-	}
-
-	function log( msg : String, ?pos : haxe.PosInfos ) {
-		haxe.Log.trace(msg,pos);
-	}
-
-   static function logVerbose(msg:String) {
-	  #if (cpp || neko || php || hl)
-	  Sys.println(msg);
-	  #end
-   }
-
-	static var count = 0;
-	static var reportInfos = null;
-	static var reportCount = 0;
-	static var checkCount = 0;
-	static var asyncWaits = new Array<haxe.PosInfos>();
-	static var asyncCache = new Array<Void -> Void>();
-	static var AMAX = 3;
-	static var timer : haxe.Timer;
-	static var success = true;
-	static var startStamp:Float;
-
-	dynamic static function report( msg : String, ?pos : haxe.PosInfos ) {
-		if( reportInfos != null ) {
-			msg += " ("+reportInfos+")";
-			reportInfos = null;
-		}
-		haxe.Log.trace(msg,pos);
-		reportCount++;
-#if !(java || cs)
-		if( reportCount == 50 ) {
-			trace("Too many errors");
-			report = function(msg,?pos) {};
-		}
-#end
-	}
-
-	static function checkDone() {
-		if( asyncWaits.length != 0 ) return;
-		if( asyncCache.length == 0 ) {
-			report("DONE ["+count+" tests]");
-			report("SUCCESS: " + success);
-
-			//out.close();
-
-			#if js
-			if (js.Browser.supported) {
-				untyped js.Browser.window.success = success;
-			}
-			#end
-
-			if (success) {
-				report("TIME: " + (haxe.Timer.stamp() - startStamp));
-			}
-			#if sys
-			Sys.exit(success ? 0 : 1);
-			#end
-
-			return;
-		}
-		resetTimer();
-		while( asyncCache.length > 0 && asyncWaits.length < AMAX )
-			asyncCache.shift()();
-	}
-
-	static function asyncTimeout() {
-		if( asyncWaits.length == 0 )
-			return;
-		for( pos in asyncWaits ) {
-			report("TIMEOUT",pos);
-			success = false;
-		}
-		asyncWaits = new Array();
-		checkDone();
-	}
-
-	static function resetTimer() {
-		#if (neko || php || cpp || java || cs || python || hl || lua)
-		#else
-		if( timer != null ) timer.stop();
-		timer = new haxe.Timer(30000);
-		timer.run = asyncTimeout;
-		#end
-	}
-
-	static function onError( e : Dynamic, msg : String, context : String ) {
-		var msg = "???";
-		var stack :String = #if js
-			e.stack;
-		#else
-			haxe.CallStack.toString(haxe.CallStack.exceptionStack());
-		#end
-		try msg = Std.string(e) catch( e : Dynamic ) {};
-		reportCount = 0;
-		report("ABORTED : "+msg+" in "+context);
-		success = false;
-		reportInfos = null;
-		trace("STACK :\n"+stack);
-#if lua
-		Sys.exit(1);
-#end
+		f(Lambda.has(Type.getClassFields(c), n));
 	}
 }

+ 3 - 9
tests/unit/src/unit/TestArrowFunctions.hx

@@ -34,12 +34,9 @@ class TestArrowFunctions extends Test {
 
 	var maybe : Void -> Bool;
 
-	function testSyntax(){
-
-		// skipping hl for now due to variance errors:
-		// Don't know how to cast ref(i32) to null(i32) see issue #6210
-		#if !as3
+	#if !as3
 
+	function testSyntax(){
 		maybe = () -> Math.random() > 0.5;
 
 		v0 = (123);
@@ -147,9 +144,6 @@ class TestArrowFunctions extends Test {
 		map = [1 => a -> a + a, 2 => a -> a + a, 3 => a -> a + a];
 
 		obj = { f : a -> a + a };
-
-		#end
-
 	}
-
+	#end
 }

+ 1 - 1
tests/unit/src/unit/TestBasetypes.hx

@@ -122,7 +122,7 @@ class TestBasetypes extends Test {
 		try {
 			"" + x.iterator();
 		} catch (e:Dynamic)	{
-			Test.report("Could not convert Iterator to String");
+			assert("Could not convert Iterator to String");
 		}
 
 		var str = "he\nlo\"'";

+ 1 - 3
tests/unit/src/unit/TestBytes.hx

@@ -85,12 +85,10 @@ class TestBytes extends Test {
 		for( s1 in strings )
 			for( s2 in strings ) {
 				var c = haxe.io.Bytes.ofString(s1).compare(haxe.io.Bytes.ofString(s2));
-				infos("compare "+s1+" and "+s2);
 				eq( c < 0, s1 < s2 );
 				eq( c > 0, s1 > s2 );
 				eq( c == 0, s1 == s2 );
 			}
-		infos(null);
 		// sub
 		var bs = haxe.io.Bytes.ofString("ABCDEFGH");
 		eq( bs.sub(1,3).compare(haxe.io.Bytes.ofString("BCD")), 0 );
@@ -137,7 +135,7 @@ class TestBytes extends Test {
 		eq(b1.getString(0,2), b2.getString(0,2));
 
 	}
-	
+
 	function testHex() {
 		var strings = ["Increasing","impression","interested","expression","companions","instrument","Her"];
 		for(s in strings) {

+ 1 - 0
tests/unit/src/unit/TestGeneric.hx

@@ -55,6 +55,7 @@ class TestGeneric extends Test {
 		n.root = new MyData(1);
 		n.root.rbLeft = new MyData(2);
 		n.root.rbRight = new MyData(3);
+		noAssert();
 	}
 
 	function testGenericAnon() {

+ 0 - 2
tests/unit/src/unit/TestIO.hx

@@ -18,8 +18,6 @@ class TestIO extends Test {
 	}
 
 	function check(endian:Bool) {
-		infos("endian = "+endian);
-
 		var b = haxe.io.Bytes.ofString("ABCééé\r\n\t");
 		eq( b.length, 12 );
 		b.set(1,0);

+ 1 - 5
tests/unit/src/unit/TestInt64.hx

@@ -468,11 +468,7 @@ class TestInt64 extends Test {
 	}
 
 	function int64eq( v : Int64, v2 : Int64, ?pos ) {
-		Test.count++;
-		if( v != v2 ) {
-			Test.report(Std.string(v)+" should be "+Std.string(v2),pos);
-			Test.success = false;
-		}
+		t(v == v2);
 	}
 
 	public function testParseString()

+ 10 - 47
tests/unit/src/unit/TestMain.hx

@@ -1,5 +1,7 @@
 package unit;
 
+import utest.ui.Report;
+import utest.Runner;
 import unit.Test.*;
 import haxe.ds.List;
 
@@ -11,16 +13,7 @@ class TestMain {
 	static var asyncWaits = new Array<haxe.PosInfos>();
 	static var asyncCache = new Array<Void -> Void>();
 
-	#if js
-	static function nodejsMain() {
-		main();
-		(untyped process).exit(Test.success ? 0 : 1);
-	}
-	#end
-
 	static function main() {
-		Test.startStamp = haxe.Timer.stamp();
-
 		#if js
 		if (js.Browser.supported) {
 			var oTrace = haxe.Log.trace;
@@ -45,7 +38,6 @@ class TestMain {
 		if( php.Web.isModNeko )
 			php.Web.setHeader("Content-Type","text/plain");
 		#end
-		resetTimer();
 		#if !macro
 		trace("Generated at: " + HelperMacros.getCompilationDate());
 		#end
@@ -121,43 +113,14 @@ class TestMain {
 
 		TestIssues.addIssueClasses("src/unit/issues", "unit.issues");
 		TestIssues.addIssueClasses("src/unit/hxcpp_issues", "unit.hxcpp_issues");
-		var current = null;
-		#if (!fail_eager)
-		try
-		#end
-		{
-			asyncWaits.push(null);
-			for( inst in classes ) {
-				current = Type.getClass(inst);
-			if (verbose)
-			   logVerbose("Class " + Std.string(current) );
-				for( f in Type.getInstanceFields(current) )
-					if( f.substr(0,4) == "test" ) {
-				  if (verbose)
-					 logVerbose("   " + f);
-						#if fail_eager
-						Reflect.callMethod(inst,Reflect.field(inst,f),[]);
-						#else
-						try {
-							Reflect.callMethod(inst,Reflect.field(inst,f),[]);
-						}
-						#if !as3
-						catch( e : Dynamic ) {
-							onError(e,"EXCEPTION",Type.getClassName(current)+"."+f);
-						}
-						#end
-						#end
-						reportInfos = null;
-					}
-			}
-			asyncWaits.remove(null);
-			checkDone();
-		}
-		#if (!as3 && !(fail_eager))
-		catch( e : Dynamic ) {
-			asyncWaits.remove(null);
-			onError(e,"ABORTED",Type.getClassName(current));
+
+		var runner = new Runner();
+		for (c in classes) {
+			runner.addCase(c);
 		}
-		#end
+		var report = Report.create(runner);
+		report.displayHeader = AlwaysShowHeader;
+		report.displaySuccessResults = NeverShowSuccessResults;
+		runner.run();
 	}
 }

+ 1 - 0
tests/unit/src/unit/TestNaN.hx

@@ -44,5 +44,6 @@ class TestNaN extends Test {
 
 		if( a < 0 || a > 0 ) assert();
 		if( a < 0 && a > 0 ) assert();
+		noAssert();
 	}
 }

+ 2 - 0
tests/unit/src/unit/TestPython.hx

@@ -99,6 +99,7 @@ class TestPython extends Test {
 
 	public function testKeywords () {
 		var list = new Array();
+		noAssert();
 	}
 
 	public function testStringMethod() {
@@ -309,6 +310,7 @@ class TestPython extends Test {
 		catch (e:Dynamic) {
 			e = 1;
 		}
+		noAssert();
 	}
 
 	var _s:String;

+ 0 - 5
tests/unit/src/unit/TestReflect.hx

@@ -97,7 +97,6 @@ class TestReflect extends Test {
 		for( i in 1...TYPES.length ) {
 			var t : Dynamic = TYPES[i];
 			var name = TNAMES[i];
-			infos("type "+name);
 			f( t == null );
 			if( name == u("Enum") || name == u("Bool") || name == u("Int") || name == u("Float") || name == u("Class") || name == u("Dynamic") ) {
 				// neither an enum or a class
@@ -109,7 +108,6 @@ class TestReflect extends Test {
 				eq( Type.resolveClass(name), t );
 			}
 		}
-		infos(null);
 	}
 
 	public function testIs() {
@@ -150,10 +148,8 @@ class TestReflect extends Test {
 	function is( v : Dynamic, t1 : Dynamic, ?t2 : Dynamic, ?pos : haxe.PosInfos ){
 		for( i in 0...TYPES.length ) {
 			var c : Dynamic = TYPES[i];
-			infos(Std.string(v)+" is "+TNAMES[i]);
 			eq( Std.is(v,c), c != null && (c == t1 || c == t2) || (c == Dynamic), pos );
 		}
-		infos(null);
 		t( (v is Dynamic), pos );
 	}
 
@@ -204,7 +200,6 @@ class TestReflect extends Test {
 
 	function typeof( v : Dynamic, rt : ValueType, ?pos : haxe.PosInfos ) {
 		var vt = Type.typeof(v);
-		infos("typeof("+Std.string(v)+") = "+vt);
 		t( Type.enumEq(vt,rt), pos );
 	}
 

+ 0 - 1
tests/unit/src/unit/TestSerialize.hx

@@ -173,7 +173,6 @@ class TestSerialize extends Test {
 		eq( b2.length, b.length );
 		for( i in 0...b.length )
 			eq( b2.get(i), b.get(i) );
-		infos(null);
 	}
 
 }

+ 1 - 2
tests/unit/src/unit/TestSerializerCrossTarget.hx

@@ -11,8 +11,7 @@ class TestSerializerCrossTarget extends Test {
 			var valueString = Reflect.field(json, fieldName);
 			var func = Reflect.field(this, fieldName);
 			if (func == null) {
-				Test.report("Missing field: " + fieldName);
-				Test.success = false;
+				assert("Missing field: " + fieldName);
 			} else {
 				Reflect.callMethod(this, func, [Unserializer.run(valueString)]);
 			}

+ 1 - 0
tests/unit/src/unit/TestType.hx

@@ -794,6 +794,7 @@ class TestType extends Test {
 	function testAbstractTypeParameterVariance() {
 		var a:Array<unit.MyAbstract.MyInt> = [1, 2, 3];
 		var b:Array<unit.MyAbstract.MyInt2> = a;
+		t(true);
 	}
 
 	function testExposingAbstract() {

+ 0 - 1
tests/unit/src/unit/TestXML.hx

@@ -164,7 +164,6 @@ class TestXML extends Test {
 		var values = ['<', '>', '"', '&', "'", '&euro;', '@', "ô", String.fromCharCode(0x3F), "ÿ"];
 
 		for( i in 0...entities.length) {
-			infos(entities[i]);
 			eq( haxe.xml.Parser.parse(entities[i], false).firstChild().nodeValue, values[i] );
 		}
 

+ 3 - 1
tests/unit/src/unit/hxcpp_issues/Issue192.hx

@@ -5,6 +5,8 @@ class ConstuctorWithArgCalledResult {
 }
 
 class Issue192 extends Test {
-	function test() new ConstuctorWithArgCalledResult(1);
+	function test() {
+		t(new ConstuctorWithArgCalledResult(1) != null);
+	}
 }
 

+ 1 - 1
tests/unit/src/unit/issues/Issue1810.hx

@@ -21,6 +21,6 @@ private class X {
 class Issue1810 extends Test {
 	function test() {
 		var a = new A([12]);
-		//eq(12, a.get().get().i);
+		eq(12, a.get().get().i);
 	}
 }

+ 1 - 1
tests/unit/src/unit/issues/Issue2085.hx

@@ -17,6 +17,6 @@ private class Ar<T> {
 
 class Issue2085 extends Test {
 	function test() {
-
+		noAssert();
 	}
 }

+ 2 - 0
tests/unit/src/unit/issues/Issue2224.hx

@@ -8,6 +8,8 @@ class Issue2224 extends unit.Test {
 		eq("opt=null", getEF2());
 		eq("opt=null", getInt());
 		eq("opt=null", getClass());
+		#else
+		noAssert();
 		#end
 	}
 

+ 1 - 0
tests/unit/src/unit/issues/Issue2236.hx

@@ -37,5 +37,6 @@ class Issue2236 extends Test {
 		for( x in a ) {
 
 		}
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue2581.hx

@@ -34,5 +34,6 @@ private class MMap<K, V> implements Arrayable<KVPair<K, V>>
 class Issue2581 extends Test {
 	function test() {
 		var MMap:MMap<String, String> = new MMap<String, String>();
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue2648.hx

@@ -13,6 +13,7 @@ class Issue2648 extends Test {
 	function test() {
 		TestParam.forName(1);
 		TestParam.forName("s");
+		noAssert();
 	}
 	#end
 }

+ 4 - 1
tests/unit/src/unit/issues/Issue2750.hx

@@ -19,11 +19,14 @@ private class Parent extends Test {
 
 class Issue2750 extends Parent {
 	function test() {
-		new Issue2750();
+		new Issue2750().run();
 	}
 
 	public function new() {
 		super();
+	}
+
+	function run() {
 		eq(3, foo());
 		eq(3, bind());
 		eq(3, match());

+ 0 - 3
tests/unit/src/unit/issues/Issue2754.hx

@@ -147,12 +147,9 @@ class Issue2754 extends unit.Test
 	// which kind of defeats the purpose of the checks
 	private function nulleq<T>(v1:Null<T>, v2:Null<T>,?pos:haxe.PosInfos)
 	{
-		this.infos("v1 == null");
 		this.t(v1 == null,pos);
-		this.infos("v2 == null");
 		this.t(v2 == null,pos);
 		this.eq(v1,v2);
-		this.infos(null);
 	}
 }
 

+ 1 - 0
tests/unit/src/unit/issues/Issue2881.hx

@@ -5,5 +5,6 @@ private abstract Callback<T>(T->Void) from (T->Void) {}
 class Issue2881 extends Test {
 	function test() {
 		var cb:Callback<Int> = null;
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue2951.hx

@@ -41,5 +41,6 @@ class Issue2951 extends Test{
 		  if ((args.length == 0)) true else false;
 		  setCwd(last);
 	  };
+	  noAssert();
   }
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue2957.hx

@@ -15,5 +15,6 @@ private abstract Integer(Int) from Int to Int {
 class Issue2957 extends Test {
 	function test() {
 		var n:Integer = "5";
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue2960.hx

@@ -9,5 +9,6 @@ class Issue2960 extends Test {
 
 	function test() {
 		call(["a" => function() {}]);
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue2980.hx

@@ -9,6 +9,7 @@ class Issue2980 extends Test {
 	function test() {
 		a();
 		b();
+		noAssert();
 	}
 	#end
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue2989.hx

@@ -7,5 +7,6 @@ class Issue2989 extends Test
 		var n = null;
 		(n is Array);
 		new haxe.ds.Vector<Int>(10);
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3005.hx

@@ -21,5 +21,6 @@ class Issue3005 extends Test {
 	function test() {
 		var a = new A<String>();
 		a.foo();
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3008.hx

@@ -4,5 +4,6 @@ class Issue3008 extends Test {
 	function test() {
 		var t = new unit.issues.misc.Issue3008Class("foo");
 		t.call();
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3024.hx

@@ -23,6 +23,7 @@ class Issue3024 extends Test {
 
 	function test() {
 		create(new Vector(1), new StringMap());
+		noAssert();
 	}
 
 	function create(myVector:MyVector, myMap:MyMap) {

+ 1 - 0
tests/unit/src/unit/issues/Issue3084.hx

@@ -25,6 +25,7 @@ class Issue3084 extends Test
 			Sys.sleep(0.01);
 			m.release();
 		}
+		noAssert();
 	}
 #end
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3090.hx

@@ -8,5 +8,6 @@ private class A<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15>{
 class Issue3090 extends Test {
 	function test() {
 		var a = new A<Printer,Printer,Printer,Printer,Printer,Printer,Printer,Printer,Printer,Printer,Printer,Printer,Printer,Printer,Printer>();
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3132.hx

@@ -6,5 +6,6 @@ class Issue3132 extends unit.Test {
 		var a:Array<{a:Int, ?b:Int}> = [{a:1, b:2}, {a:1}];
 		//t(unit.HelperMacros.typeError([{a:1}, {a:1, b:2}]));
 		//t(unit.HelperMacros.typeError([{a:1, b:2}, {a:1}]));
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3133.hx

@@ -10,5 +10,6 @@ class Issue3133 extends Test {
 	function test() {
 		var t = new Child();
 		t.test("foo");
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3138.hx

@@ -8,6 +8,7 @@ class Issue3138 extends Test
 #if (java || cs)
 		var b = new D();
 #end
+		noAssert();
 	}
 }
 

+ 2 - 4
tests/unit/src/unit/issues/Issue3345.hx

@@ -24,19 +24,17 @@ private abstract Meters(Float) from Float {
 }
 
 class Issue3345 extends Test {
+	#if !lua
 	function test() {
 		var acc:Meters = .0;
 		for (i in 0...10)
 			acc += 10;
-#if !lua
 		eq("100(m)", acc);
-#end
 
 		var acc:Meters = .0;
 		for (i in 0...10)
 			acc -= 10;
-#if !lua
 		eq("-100(m)", acc);
-#end
 	}
+	#end
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3383.hx

@@ -21,6 +21,7 @@ class Issue3383 extends Test {
 			eq(n, null);
 			#else
 			Sys.stderr().writeString("https://github.com/HaxeFoundation/haxe/issues/5503 pending\n");
+			noAssert();
 			#end
 	}
 #end

+ 2 - 2
tests/unit/src/unit/issues/Issue3388.hx

@@ -21,10 +21,10 @@ private abstract A<T>(Array<T>) {
 }
 
 class Issue3388 extends Test {
+	#if java
 	function test() {
-		#if java
 		eq("sum of ints", new A([1]).sum());
 		eq("sum of strings", new A(["1"]).sum());
-		#end
 	}
+	#end
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3390.hx

@@ -15,5 +15,6 @@ class Issue3390 extends Test {
 	function test() {
 		A.a();
 		B.b();
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3400.hx

@@ -6,6 +6,7 @@ class Issue3400 extends Test
 	public function test()
 	{
 		var a:AbstractList<haxe.Int64> = AbstractList.empty();
+		noAssert();
 	}
 #end
 }

+ 2 - 2
tests/unit/src/unit/issues/Issue3451.hx

@@ -5,8 +5,8 @@ class MatrixExt extends flash.geom.Matrix { }
 #end
 
 class Issue3451 extends Test {
+	#if flash
 	public function test() {
-		#if flash
 		var m = new MatrixExt();
 		feq(1, m.a);
 		feq(0, m.b);
@@ -14,6 +14,6 @@ class Issue3451 extends Test {
 		feq(1, m.d);
 		feq(0, m.tx);
 		feq(0, m.ty);
-		#end
 	}
+	#end
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3480.hx

@@ -6,5 +6,6 @@ class Issue3480 extends Test {
 		if (!js.Browser.supported || js.Browser.navigator.userAgent.indexOf('MSIE 8') == -1) // IE8 doesn't like toString fields at all
 			eq("{\n\ttoString : 1\n}", Std.string({toString: 1}));
 		#end
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3486.hx

@@ -6,6 +6,7 @@ class Issue3486 extends Test {
 	function test() {
 		var l = new List();
 		flatMap(l);
+		noAssert();
 	}
 
 	static public function flatMap<B>(a:List<B>) {

+ 1 - 0
tests/unit/src/unit/issues/Issue3528.hx

@@ -11,6 +11,7 @@ class Issue3528 extends Test {
 			case Some(v):
 			case None:
 		}
+		noAssert();
     }
 
 	static function test1(v:haxe.ds.Option<Int>) {

+ 3 - 1
tests/unit/src/unit/issues/Issue3545.hx

@@ -10,5 +10,7 @@ typedef T2<T:Constraint> = {
 
 class Issue3545 extends Test {
 	// if it compiles it works
-	function test() { }
+	function test() {
+		noAssert();
+	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3547.hx

@@ -10,6 +10,7 @@ class Issue3547 extends Test {
 		var o = {foo:12, "x-bar":13};
 		assign(o);
 		assign({foo:12, "x-bar":13});
+		noAssert();
 	}
 
 	static function assign(o:Option) { }

+ 1 - 1
tests/unit/src/unit/issues/Issue3615.hx

@@ -21,6 +21,6 @@ private class SubClassTwo extends BaseClass<String>
 
 class Issue3615 extends Test {
 	function test() {
-
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3639.hx

@@ -46,5 +46,6 @@ class Issue3639 extends Test {
 		hf(MyClass, "testMember_String");
 		hf(MyClass, "eachMember_IntIterator");
 		#end
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3713.hx

@@ -17,5 +17,6 @@ class Issue3713 extends Test {
 	function test() {
 		var b = new B<Int>();
 		var c = b.f();
+		noAssert();
 	}
 }

+ 2 - 2
tests/unit/src/unit/issues/Issue3771.hx

@@ -2,11 +2,11 @@ package unit.issues;
 
 class Issue3771 extends Test
 {
+	#if cs
 	public function test()
 	{
-#if cs
 		var arr = [test];
 		eq(arr.indexOf(test),0);
-#end
 	}
+	#end
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3777.hx

@@ -13,5 +13,6 @@ class Issue3777 extends unit.Test {
 	function test() {
 		// if it compiles, it works
 		new B();
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3781.hx

@@ -14,6 +14,7 @@ class Issue3781 extends Test {
 
 	function test() {
 		call(new Ab());
+		noAssert();
 	}
 
 	static function call<T:Ab>(v:T) {

+ 1 - 0
tests/unit/src/unit/issues/Issue3804.hx

@@ -8,5 +8,6 @@ private class C<T> {
 class Issue3804 extends Test {
 	function test() {
 		var v:C<Int> = new C();
+		noAssert();
 	}
 }

+ 2 - 6
tests/unit/src/unit/issues/Issue3826.hx

@@ -35,12 +35,8 @@ class Issue3826 extends Test {
 		#end
 	}
 
+	#if !(java || cs || flash)
 	public function testReflect() {
-		#if (java || cs)
-		return; // TODO
-		#end
-
-		#if !flash
 		eq( Reflect.callMethod(this, get, []), "2/4.25" );
 		eq( Reflect.callMethod(this, get, [5]), "5/4.25" );
 		eq( Reflect.callMethod(this, get, [5,8.5]), "5/8.5" );
@@ -50,8 +46,8 @@ class Issue3826 extends Test {
 		eq( Reflect.callMethod(this, get, [null,null]), "2/4.25" );
 		eq( Reflect.callMethod(this, get, [ival,fval]), "5/8.5" );
 		eq( Reflect.callMethod(this, get, [dval,dval]), "6/6" );
-		#end
 	}
+	#end
 
 	function getOpt( ?a = 2, ?b = 4.25 ) {
 		return ""+a+"/"+b;

+ 1 - 0
tests/unit/src/unit/issues/Issue3844.hx

@@ -6,5 +6,6 @@ class Issue3844 extends Test {
 	function test() {
 		var n:A = {f: null};
 		do n = n.f while (n!=null && (n!=null || n!=null));
+		noAssert();
 	}
 }

+ 2 - 2
tests/unit/src/unit/issues/Issue3846.hx

@@ -20,10 +20,10 @@ private class Extern {
 #end
 
 class Issue3846 extends Test {
+	#if (!java && !cs)
 	function test() {
-		#if (!java && !cs)
 		eq("coucou", Extern.test("coucou"));
 		eq(1, Extern.test(1));
-		#end
 	}
+	#end
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue3894.hx

@@ -6,5 +6,6 @@ class Issue3894 extends Test {
 		// this doesn't actually error until post-processing so we cannot test it like this
 		//t(unit.HelperMacros.typeError((null : haxe.Int64)));
 		#end
+		noAssert();
 	}
 }

+ 2 - 0
tests/unit/src/unit/issues/Issue3935.hx

@@ -12,6 +12,7 @@ class Issue3935 extends Test {
 		var m2 = new MyClass();
 		var c:haxe.ds.ObjectMap<MyClass, Dynamic> = [m => 1, m2 => "1"];
 		var c:haxe.ds.EnumValueMap<haxe.macro.Expr.ExprDef, Dynamic> = [EBreak => 1, EContinue => "2"];
+		noAssert();
 	}
 
 	function testMap() {
@@ -21,6 +22,7 @@ class Issue3935 extends Test {
 		var m2 = new MyClass();
 		var c:Map<MyClass, Dynamic> = [m => 1, m2 => "1"];
 		var c:Map<haxe.macro.Expr.ExprDef, Dynamic> = [EBreak => 1, EContinue => "2"];
+		noAssert();
 	}
 
 	function testFail() {

+ 2 - 2
tests/unit/src/unit/issues/Issue3979.hx

@@ -7,9 +7,9 @@ import cs.NativeArray;
 
 class Issue3979 extends Test
 {
+	#if (java || cs)
 	public function test()
 	{
-#if (java || cs)
 		var v = 0;
 		var nv = NativeArray.make(1,2,3,4,5,6);
 		eq(nv.length,6);
@@ -18,6 +18,6 @@ class Issue3979 extends Test
 			eq(val,++v);
 		}
 		eq(v,6);
-#end
 	}
+	#end
 }

+ 2 - 2
tests/unit/src/unit/issues/Issue4051.hx

@@ -2,10 +2,10 @@ package unit.issues;
 
 class Issue4051 extends Test
 {
+	#if !flash
 	public function test()
 	{
-#if !flash
 		eq(Std.parseFloat("1154874.2868745863"), 1154874.2868745863);
-#end
 	}
+	#end
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4076.hx

@@ -7,5 +7,6 @@ class Issue4076 extends Test {
 		while (b && ((i = 18) < 18)) {
 		  ++i;
 		}
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4086.hx

@@ -6,6 +6,7 @@ private typedef FruitItem = { name: String, count: Int };
 class Issue4086 extends Test {
 	function test() {
 		check(apply3("apple", 5));
+		noAssert();
 	}
 
 	static function check(item:GroceryItem) { }

+ 1 - 0
tests/unit/src/unit/issues/Issue4149.hx

@@ -4,5 +4,6 @@ class Issue4149 extends Test {
 	function test() {
 		var a = "a";
 		{};
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4222.hx

@@ -18,5 +18,6 @@ class Issue4222 extends Test {
 	function test() {
 		var c = new Child();
 		var v = c.covariant();
+		noAssert();
 	}
 }

+ 2 - 2
tests/unit/src/unit/issues/Issue4232.hx

@@ -9,10 +9,10 @@ class Issue4232CreateMe {
 }
 
 class Issue4232 extends Test {
+	#if !hl // too many arguments in HL
 	function test() {
-		#if !hl // too many arguments in HL
 		var c:Issue4232CreateMe = Type.createInstance(Issue4232CreateMe, [for (i in 1...15) "" + i]);
 		eq("1234567891011121314", c.value);
-		#end
 	}
+	#end
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4246.hx

@@ -6,5 +6,6 @@ class Issue4246 extends Test {
 	function test() {
 		and();
 		_and();
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4310.hx

@@ -10,5 +10,6 @@ class Issue4310 extends Test {
 	function test() {
 		var child1:BaseClass = new Child1();
 		cast(child1, BaseClass);
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4329.hx

@@ -14,5 +14,6 @@ class Issue4329 extends Test {
 
 	function test() {
 		foo(12);
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4343.hx

@@ -3,6 +3,7 @@ package unit.issues;
 class Issue4343 extends Test {
 	function test() {
 		(new SomeObject() : ISomeObject).call();
+		noAssert();
 	}
 }
 

+ 1 - 0
tests/unit/src/unit/issues/Issue4397.hx

@@ -6,6 +6,7 @@ class Issue4397 extends Test {
 	#if js
 	function test() {
 		0.toFixed();
+		noAssert();
 	}
 
     static inline function toFixed(f:Float):String {

+ 1 - 0
tests/unit/src/unit/issues/Issue4457.hx

@@ -14,6 +14,7 @@ class Issue4457 extends Test
 	public function test()
 	{
 		new B<A>();
+		noAssert();
 	}
 
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4501.hx

@@ -7,5 +7,6 @@ private class Dummy<T> {
 class Issue4501 extends Test {
 	function test() {
 		new Dummy(null);
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4591.hx

@@ -3,6 +3,7 @@ package unit.issues;
 class Issue4591 extends Test {
 	public function test() {
 		var x:C<C<String>> = null;
+		noAssert();
 	}
 }
 

+ 1 - 0
tests/unit/src/unit/issues/Issue4644.hx

@@ -20,5 +20,6 @@ class Issue4644 extends Test {
 		);
 		f(isHaxeError);
 		#end
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4672.hx

@@ -20,5 +20,6 @@ class Issue4672 extends Test {
 
 		var x = new C2<String>();
 		x.test("foo");
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4703.hx

@@ -19,6 +19,7 @@ class Issue4703 extends Test {
 			m.y = 2;
 		}
 		useeeee(m.y);
+		noAssert();
 	}
 
 	static function useeeee(d:Dynamic) { }

+ 2 - 0
tests/unit/src/unit/issues/Issue4751.hx

@@ -12,6 +12,7 @@ class Issue4751 extends Test{
 	function testNadako() {
 		var o:{?v:O} = {};
 		func(if (cond()) o.v.get() else throw "oh");
+		noAssert();
 	}
 
 	function testGama() {
@@ -23,6 +24,7 @@ class Issue4751 extends Test{
 			dy = t;
 		};
 		func(dy * 1.1);
+		noAssert();
 	}
 
 	static function cond() return true;

+ 1 - 0
tests/unit/src/unit/issues/Issue4843.hx

@@ -9,5 +9,6 @@ private abstract A({}) from {} {
 class Issue4843 extends Test {
 	function test() {
 		var a:A = {};
+		noAssert();
 	}
 }

+ 2 - 2
tests/unit/src/unit/issues/Issue4878.hx

@@ -5,8 +5,8 @@ import java.vm.Mutex;
 #end
 
 class Issue4878 extends Test {
+	#if java
   function test() {
-#if java
     var mutex = new Mutex();
     var thread = Thread.create(function() {
       mutex.acquire();
@@ -19,6 +19,6 @@ class Issue4878 extends Test {
     f(mutex.tryAcquire());
     Sys.sleep(.3);
     t(mutex.tryAcquire());
-#end
   }
+  #end
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4918.hx

@@ -11,5 +11,6 @@ class Issue4918 extends Test {
 		var f = function() {
 			trace(minParams);
 		};
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4949.hx

@@ -16,5 +16,6 @@ class Issue4949 extends Test {
 
 	function test() {
 		foo();
+		noAssert();
 	}
 }

+ 1 - 0
tests/unit/src/unit/issues/Issue4986.hx

@@ -6,6 +6,7 @@ class Issue4986 extends Test {
 			var v = new haxe.ds.Vector<Array<Float>>(1);
 			foo(v[0].length);
 		} catch (e:Dynamic) {}
+		noAssert();
 	}
 
 	function foo(_) {}

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio