Browse Source

move some stuff around in the unit tests to make them comp-server-compatible

Simon Krajewski 9 years ago
parent
commit
5e5b86af28
79 changed files with 366 additions and 348 deletions
  1. 8 8
      tests/RunCi.hx
  2. 1 1
      tests/unit/compile-as3.hxml
  3. 1 1
      tests/unit/compile-cpp.hxml
  4. 1 1
      tests/unit/compile-cppia.hxml
  5. 1 1
      tests/unit/compile-cs-unsafe.hxml
  6. 1 1
      tests/unit/compile-cs.hxml
  7. 1 1
      tests/unit/compile-flash9.hxml
  8. 1 1
      tests/unit/compile-hl.hxml
  9. 1 1
      tests/unit/compile-java.hxml
  10. 1 1
      tests/unit/compile-js.hxml
  11. 1 1
      tests/unit/compile-lua.hxml
  12. 1 1
      tests/unit/compile-macro.hxml
  13. 1 1
      tests/unit/compile-neko.hxml
  14. 1 1
      tests/unit/compile-php.hxml
  15. 1 1
      tests/unit/compile-python.hxml
  16. 54 0
      tests/unit/src/unit/HelperMacros.hx
  17. 1 1
      tests/unit/src/unit/MyClass.hx
  18. 1 144
      tests/unit/src/unit/Test.hx
  19. 3 3
      tests/unit/src/unit/TestGADT.hx
  20. 3 3
      tests/unit/src/unit/TestGeneric.hx
  21. 1 1
      tests/unit/src/unit/TestJava.hx
  22. 152 0
      tests/unit/src/unit/TestMain.hx
  23. 16 25
      tests/unit/src/unit/TestMatch.hx
  24. 2 9
      tests/unit/src/unit/TestMeta.hx
  25. 1 1
      tests/unit/src/unit/TestOrder.hx
  26. 2 2
      tests/unit/src/unit/TestOverloads.hx
  27. 1 32
      tests/unit/src/unit/TestType.hx
  28. 9 9
      tests/unit/src/unit/issues/Issue2063.hx
  29. 1 1
      tests/unit/src/unit/issues/Issue2157.hx
  30. 1 1
      tests/unit/src/unit/issues/Issue2184.hx
  31. 4 4
      tests/unit/src/unit/issues/Issue2235.hx
  32. 1 1
      tests/unit/src/unit/issues/Issue2343.hx
  33. 2 0
      tests/unit/src/unit/issues/Issue2521.hx
  34. 2 2
      tests/unit/src/unit/issues/Issue2584.hx
  35. 2 2
      tests/unit/src/unit/issues/Issue2614.hx
  36. 1 1
      tests/unit/src/unit/issues/Issue2619.hx
  37. 2 2
      tests/unit/src/unit/issues/Issue2625.hx
  38. 1 1
      tests/unit/src/unit/issues/Issue2639.hx
  39. 2 2
      tests/unit/src/unit/issues/Issue2661.hx
  40. 3 3
      tests/unit/src/unit/issues/Issue2675.hx
  41. 4 4
      tests/unit/src/unit/issues/Issue2750.hx
  42. 3 3
      tests/unit/src/unit/issues/Issue2776.hx
  43. 2 2
      tests/unit/src/unit/issues/Issue2778.hx
  44. 1 1
      tests/unit/src/unit/issues/Issue2786.hx
  45. 1 1
      tests/unit/src/unit/issues/Issue2813.hx
  46. 1 1
      tests/unit/src/unit/issues/Issue2844.hx
  47. 1 1
      tests/unit/src/unit/issues/Issue2859.hx
  48. 1 1
      tests/unit/src/unit/issues/Issue2907.hx
  49. 1 1
      tests/unit/src/unit/issues/Issue2914.hx
  50. 1 1
      tests/unit/src/unit/issues/Issue2939.hx
  51. 2 2
      tests/unit/src/unit/issues/Issue2979.hx
  52. 1 1
      tests/unit/src/unit/issues/Issue3054.hx
  53. 3 3
      tests/unit/src/unit/issues/Issue3089.hx
  54. 1 1
      tests/unit/src/unit/issues/Issue3110.hx
  55. 2 2
      tests/unit/src/unit/issues/Issue3132.hx
  56. 1 1
      tests/unit/src/unit/issues/Issue3150.hx
  57. 1 1
      tests/unit/src/unit/issues/Issue3181.hx
  58. 3 3
      tests/unit/src/unit/issues/Issue3183.hx
  59. 3 3
      tests/unit/src/unit/issues/Issue3347.hx
  60. 3 3
      tests/unit/src/unit/issues/Issue3360.hx
  61. 1 1
      tests/unit/src/unit/issues/Issue3391.hx
  62. 2 2
      tests/unit/src/unit/issues/Issue3396.hx
  63. 2 2
      tests/unit/src/unit/issues/Issue3596.hx
  64. 4 4
      tests/unit/src/unit/issues/Issue3616.hx
  65. 2 2
      tests/unit/src/unit/issues/Issue3635.hx
  66. 4 4
      tests/unit/src/unit/issues/Issue3714.hx
  67. 1 1
      tests/unit/src/unit/issues/Issue3894.hx
  68. 4 4
      tests/unit/src/unit/issues/Issue3935.hx
  69. 2 2
      tests/unit/src/unit/issues/Issue4121.hx
  70. 4 4
      tests/unit/src/unit/issues/Issue4122.hx
  71. 1 1
      tests/unit/src/unit/issues/Issue4196.hx
  72. 1 1
      tests/unit/src/unit/issues/Issue4277.hx
  73. 1 1
      tests/unit/src/unit/issues/Issue4284.hx
  74. 2 2
      tests/unit/src/unit/issues/Issue4306.hx
  75. 3 3
      tests/unit/src/unit/issues/Issue4526.hx
  76. 1 1
      tests/unit/src/unit/issues/Issue4666.hx
  77. 1 1
      tests/unit/src/unit/issues/Issue4940.hx
  78. 2 2
      tests/unit/src/unit/issues/Issue5322.hx
  79. 2 2
      tests/unit/src/unitstd/haxe/extern/EitherType.unit.hx

+ 8 - 8
tests/RunCi.hx

@@ -861,7 +861,7 @@ class RunCi {
 					case Cpp:
 					case Cpp:
 						getCppDependencies();
 						getCppDependencies();
 						runCommand("haxe", ["compile-cpp.hxml", "-D", "HXCPP_M32"].concat(args));
 						runCommand("haxe", ["compile-cpp.hxml", "-D", "HXCPP_M32"].concat(args));
-						runCpp("bin/cpp/Test-debug", []);
+						runCpp("bin/cpp/TestMain-debug", []);
 
 
 						switch (ci) {
 						switch (ci) {
 							case AppVeyor:
 							case AppVeyor:
@@ -869,7 +869,7 @@ class RunCi {
 							case _:
 							case _:
 								runCommand("rm", ["-rf", "cpp"]);
 								runCommand("rm", ["-rf", "cpp"]);
 								runCommand("haxe", ["compile-cpp.hxml", "-D", "HXCPP_M64"].concat(args));
 								runCommand("haxe", ["compile-cpp.hxml", "-D", "HXCPP_M64"].concat(args));
-								runCpp("bin/cpp/Test-debug", []);
+								runCpp("bin/cpp/TestMain-debug", []);
 
 
 								runCommand("haxe", ["compile-cppia-host.hxml"]);
 								runCommand("haxe", ["compile-cppia-host.hxml"]);
 								runCommand("haxe", ["compile-cppia.hxml"]);
 								runCommand("haxe", ["compile-cppia.hxml"]);
@@ -909,7 +909,7 @@ class RunCi {
 								}
 								}
 								FileSystem.rename("bin/unit.js", output);
 								FileSystem.rename("bin/unit.js", output);
 								FileSystem.rename("bin/unit.js.map", output + ".map");
 								FileSystem.rename("bin/unit.js.map", output + ".map");
-								runCommand("node", ["-e", "var unit = require('./" + output + "').unit; unit.Test.main(); process.exit(unit.Test.success ? 0 : 1);"]);
+								runCommand("node", ["-e", "var unit = require('./" + output + "').unit; unit.TestMain.main(); process.exit(unit.Test.success ? 0 : 1);"]);
 								output;
 								output;
 							}
 							}
 						];
 						];
@@ -952,10 +952,10 @@ class RunCi {
 					case Java:
 					case Java:
 						getJavaDependencies();
 						getJavaDependencies();
 						runCommand("haxe", ["compile-java.hxml"].concat(args));
 						runCommand("haxe", ["compile-java.hxml"].concat(args));
-						runCommand("java", ["-jar", "bin/java/Test-Debug.jar"]);
+						runCommand("java", ["-jar", "bin/java/TestMain-Debug.jar"]);
 
 
 						runCommand("haxe", ["compile-java.hxml","-dce","no"].concat(args));
 						runCommand("haxe", ["compile-java.hxml","-dce","no"].concat(args));
-						runCommand("java", ["-jar", "bin/java/Test-Debug.jar"]);
+						runCommand("java", ["-jar", "bin/java/TestMain-Debug.jar"]);
 
 
 						changeDirectory(sysDir);
 						changeDirectory(sysDir);
 						runCommand("haxe", ["compile-java.hxml"]);
 						runCommand("haxe", ["compile-java.hxml"]);
@@ -992,14 +992,14 @@ class RunCi {
 						{
 						{
 							var extras = fastcast.concat(erasegenerics).concat(noroot);
 							var extras = fastcast.concat(erasegenerics).concat(noroot);
 							runCommand("haxe", ['compile-cs$compl.hxml'].concat(extras));
 							runCommand("haxe", ['compile-cs$compl.hxml'].concat(extras));
-							runCs("bin/cs/bin/Test-Debug.exe");
+							runCs("bin/cs/bin/TestMain-Debug.exe");
 
 
 							runCommand("haxe", ['compile-cs-unsafe$compl.hxml'].concat(extras));
 							runCommand("haxe", ['compile-cs-unsafe$compl.hxml'].concat(extras));
-							runCs("bin/cs_unsafe/bin/Test-Debug.exe");
+							runCs("bin/cs_unsafe/bin/TestMain-Debug.exe");
 						}
 						}
 
 
 						runCommand("haxe", ['compile-cs$compl.hxml','-dce','no']);
 						runCommand("haxe", ['compile-cs$compl.hxml','-dce','no']);
-						runCs("bin/cs/bin/Test-Debug.exe");
+						runCs("bin/cs/bin/TestMain-Debug.exe");
 
 
 						changeDirectory(sysDir);
 						changeDirectory(sysDir);
 						runCommand("haxe", ["compile-cs.hxml",'-D','fast_cast']);
 						runCommand("haxe", ["compile-cs.hxml",'-D','fast_cast']);

+ 1 - 1
tests/unit/compile-as3.hxml

@@ -1,4 +1,4 @@
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 -as3 bin/as3
 -as3 bin/as3
 -cmd mxmlc -static-link-runtime-shared-libraries=true -debug bin/as3/__main__.as --output bin/unit9_as3.swf
 -cmd mxmlc -static-link-runtime-shared-libraries=true -debug bin/as3/__main__.as --output bin/unit9_as3.swf

+ 1 - 1
tests/unit/compile-cpp.hxml

@@ -1,4 +1,4 @@
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 -cpp bin/cpp
 -cpp bin/cpp
 -D HXCPP_NO_DEBUG_LINK
 -D HXCPP_NO_DEBUG_LINK

+ 1 - 1
tests/unit/compile-cppia.hxml

@@ -1,3 +1,3 @@
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 -cppia bin/unit.cppia
 -cppia bin/unit.cppia

+ 1 - 1
tests/unit/compile-cs-unsafe.hxml

@@ -4,7 +4,7 @@
 --next
 --next
 
 
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 -D unsafe
 -D unsafe
 -cs bin/cs_unsafe
 -cs bin/cs_unsafe
 -net-lib native_cs/bin/native_cs.dll
 -net-lib native_cs/bin/native_cs.dll

+ 1 - 1
tests/unit/compile-cs.hxml

@@ -4,6 +4,6 @@
 --next
 --next
 
 
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 -cs bin/cs
 -cs bin/cs
 -net-lib native_cs/bin/native_cs.dll
 -net-lib native_cs/bin/native_cs.dll

+ 1 - 1
tests/unit/compile-flash9.hxml

@@ -1,4 +1,4 @@
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 -swf-version 11
 -swf-version 11
 -swf bin/unit9.swf
 -swf bin/unit9.swf

+ 1 - 1
tests/unit/compile-hl.hxml

@@ -1,4 +1,4 @@
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 -hl bin/unit.hl
 -hl bin/unit.hl
 -D interp
 -D interp

+ 1 - 1
tests/unit/compile-java.hxml

@@ -4,7 +4,7 @@
 --next
 --next
 
 
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 -java bin/java
 -java bin/java
 -java-lib native_java/native.jar
 -java-lib native_java/native.jar
 -java-lib java_drivers/mysql-connector-java-5.1.32-bin.jar
 -java-lib java_drivers/mysql-connector-java-5.1.32-bin.jar

+ 1 - 1
tests/unit/compile-js.hxml

@@ -6,5 +6,5 @@
 --next
 --next
 
 
 compile-each.hxml
 compile-each.hxml
-unit.Test
+unit.TestMain
 -js bin/unit.js
 -js bin/unit.js

+ 1 - 1
tests/unit/compile-lua.hxml

@@ -1,3 +1,3 @@
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 -lua bin/unit.lua
 -lua bin/unit.lua

+ 1 - 1
tests/unit/compile-macro.hxml

@@ -1,3 +1,3 @@
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 --interp
 --interp

+ 1 - 1
tests/unit/compile-neko.hxml

@@ -1,4 +1,4 @@
 compile-each.hxml
 compile-each.hxml
 -D neko_v2
 -D neko_v2
--main unit.Test
+-main unit.TestMain
 -neko bin/unit.n
 -neko bin/unit.n

+ 1 - 1
tests/unit/compile-php.hxml

@@ -1,3 +1,3 @@
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 -php bin/php
 -php bin/php

+ 1 - 1
tests/unit/compile-python.hxml

@@ -1,3 +1,3 @@
 compile-each.hxml
 compile-each.hxml
--main unit.Test
+-main unit.TestMain
 -python bin/unit.py
 -python bin/unit.py

+ 54 - 0
tests/unit/src/unit/HelperMacros.hx

@@ -0,0 +1,54 @@
+package unit;
+
+import haxe.macro.Expr;
+
+class HelperMacros {
+	static public macro function getCompilationDate() {
+		return macro $v { Std.string(Date.now()) };
+	}
+
+	static public macro function typedAs(actual:haxe.macro.Expr, expected:haxe.macro.Expr) {
+		var tExpected = haxe.macro.Context.typeof(expected);
+		var tActual = haxe.macro.Context.typeof(actual);
+		return haxe.macro.Context.parse("eq('" +Std.string(tActual) + "', '" +Std.string(tExpected) + "')", haxe.macro.Context.currentPos());
+	}
+
+	static public macro function typeError(e:haxe.macro.Expr) {
+		var result = try {
+			haxe.macro.Context.typeof(e);
+			"false";
+		} catch (e:Dynamic) "true";
+		return { pos: haxe.macro.Context.currentPos(), expr: haxe.macro.Expr.ExprDef.EConst(haxe.macro.Expr.Constant.CIdent(result)) };
+	}
+
+	static public macro function typeErrorText(e:haxe.macro.Expr) {
+		var result = try {
+			haxe.macro.Context.typeof(e);
+			null;
+		} catch (e:haxe.macro.Expr.Error) e.message;
+		return {
+			pos: haxe.macro.Context.currentPos(),
+			expr: if (result == null)
+					haxe.macro.Expr.ExprDef.EConst(haxe.macro.Expr.Constant.CIdent("null"))
+				else
+					haxe.macro.Expr.ExprDef.EConst(haxe.macro.Expr.Constant.CString(result))
+		};
+	}
+
+	static public macro function getMeta(e) {
+		switch(e.expr) {
+			case EMeta(m, _):
+				return macro { name: $v{m.name}, args: $a{m.params} };
+			default:
+				return macro report("Metadata expected");
+		}
+	}
+
+	static public macro function getErrorMessage(e:Expr) {
+		var result = try {
+			haxe.macro.Context.typeof(e);
+			"no error";
+		} catch (e:Dynamic) Std.string(e.message);
+		return macro $v{result};
+	}
+}

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

@@ -197,7 +197,7 @@ class UsingChild2 extends UsingBase {
 
 
 class UsingUnrelated {
 class UsingUnrelated {
 	static public function test() {
 	static public function test() {
-		var err = TestType.typeError("foo".privFunc());
+		var err = HelperMacros.typeError("foo".privFunc());
 		return err + "foo".pupFunc() + "foo".siblingFunc();
 		return err + "foo".pupFunc() + "foo".siblingFunc();
 	}
 	}
 }
 }

+ 1 - 144
tests/unit/src/unit/Test.hx

@@ -7,7 +7,6 @@ import cpp.link.StaticSqlite;
 import cpp.link.StaticZlib;
 import cpp.link.StaticZlib;
 #end
 #end
 
 
-@:expose("unit.Test")
 @:keepSub
 @:keepSub
 #if as3
 #if as3
 @:publicFields
 @:publicFields
@@ -274,146 +273,4 @@ class Test {
 		reportInfos = null;
 		reportInfos = null;
 		trace("STACK :\n"+stack);
 		trace("STACK :\n"+stack);
 	}
 	}
-
-	static function main() {
-	  var verbose = #if ( cpp || neko || php ) Sys.args().indexOf("-v") >= 0 #else false #end;
-
-		#if cs //"Turkey Test" - Issue #996
-		cs.system.threading.Thread.CurrentThread.CurrentCulture = new cs.system.globalization.CultureInfo('tr-TR');
-		cs.Lib.applyCultureChanges();
-		#end
-		#if neko
-		if( neko.Web.isModNeko )
-			neko.Web.setHeader("Content-Type","text/plain");
-		#elseif php
-		if( php.Web.isModNeko )
-			php.Web.setHeader("Content-Type","text/plain");
-		#end
-		resetTimer();
-		#if !macro
-		trace("Generated at: " + TestType.getCompilationDate());
-		#end
-		trace("START");
-		#if flash
-		var tf : flash.text.TextField = untyped flash.Boot.getTrace();
-		tf.selectable = true;
-		tf.mouseEnabled = true;
-		#end
-		var classes = [
-			new TestOps(),
-			new TestBasetypes(),
-			new TestBytes(),
-			new TestIO(),
-			new TestLocals(),
-			new TestEReg(),
-			new TestXML(),
-			new TestMisc(),
-			new TestJson(),
-			new TestResource(),
-			new TestInt64(),
-			new TestReflect(),
-			new TestSerialize(),
-			new TestMeta(),
-			new TestType(),
-			new TestOrder(),
-			new TestGADT(),
-			new TestGeneric(),
-			#if !no_pattern_matching
-			new TestMatch(),
-			#end
-			new TestSpecification(),
-			#if cs
-			new TestCSharp(),
-			#end
-			#if java
-			new TestJava(),
-			#end
-			#if lua
-			new TestLua(),
-			#end
-			#if python
-			new TestPython(),
-			#end
-			#if hl
-			new TestHL(),
-			#end
-			#if php
-			new TestPhp(),
-			#end
-			#if (java || cs)
-			new TestOverloads(),
-			#end
-			#if ((dce == "full") && !interp && !as3)
-			new TestDCE(),
-			#end
-			// #if ( (java || neko) && !macro && !interp)
-			// new TestThreads(),
-			// #end
-			//new TestUnspecified(),
-			//new TestRemoting(),
-		];
-
-
-		#if js
-		if (js.Browser.supported) {
-			classes.push(new TestJQuery());
-		}
-		#end
-
-		// SPOD tests
-		#if ( (neko || (php && (travis || appveyor || php_sqlite)) || java || cpp || (cs && (travis || appveyor))) && !macro && !interp)
-		#if ( (travis || appveyor) && !(cpp || cs) )
-		classes.push(new TestSpod(sys.db.Mysql.connect({
-			host : "127.0.0.1",
-			user : "travis",
-			pass : "",
-			port : 3306,
-			database : "haxe_test" })));
-		#end
-		if (verbose)
-			logVerbose("Setup sqlite");
-		classes.push(new TestSpod(sys.db.Sqlite.open("db.db3")));
-		#end
-		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));
-		}
-		#end
-	}
-
-}
+}

+ 3 - 3
tests/unit/src/unit/TestGADT.hx

@@ -28,17 +28,17 @@ class TestGADT extends Test {
 
 
 		var eadd = EBinop(OpAdd,e1,e2);
 		var eadd = EBinop(OpAdd,e1,e2);
 		var s = eval(eadd);
 		var s = eval(eadd);
-		TestType.typedAs(s, ti);
+		HelperMacros.typedAs(s, ti);
 		eq(s,20);
 		eq(s,20);
 
 
 		var eeq = EBinop(OpEq,e1,e2);
 		var eeq = EBinop(OpEq,e1,e2);
 		var s = eval(eeq);
 		var s = eval(eeq);
-		TestType.typedAs(s, tb);
+		HelperMacros.typedAs(s, tb);
 		eq(s,false);
 		eq(s,false);
 
 
 		var eeq = EBinop(OpEq,e1,e3);
 		var eeq = EBinop(OpEq,e1,e3);
 		var s = eval(eeq);
 		var s = eval(eeq);
-		TestType.typedAs(s, tb);
+		HelperMacros.typedAs(s, tb);
 		eq(s,true);
 		eq(s,true);
 	}
 	}
 
 

+ 3 - 3
tests/unit/src/unit/TestGeneric.hx

@@ -52,13 +52,13 @@ class TestGeneric extends Test {
 
 
 	function testExtends() {
 	function testExtends() {
 		// basic class
 		// basic class
-		//t(unit.TestType.typeError(new MyGeneric2<String>()));
+		//t(unit.HelperMacros.typeError(new MyGeneric2<String>()));
 
 
 		// not a class
 		// not a class
-		//t(unit.TestType.typeError(new MyGeneric2<Int>()));
+		//t(unit.HelperMacros.typeError(new MyGeneric2<Int>()));
 
 
 		// no constructor
 		// no constructor
-		//t(unit.TestType.typeError(new MyGeneric2<MyRandomEmptyClass>()));
+		//t(unit.HelperMacros.typeError(new MyGeneric2<MyRandomEmptyClass>()));
 
 
 		var mg = new MyGeneric2<MyRandomClass>("foo");
 		var mg = new MyGeneric2<MyRandomClass>("foo");
 		eq("foo", mg.s);
 		eq("foo", mg.s);

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

@@ -290,7 +290,7 @@ class TestJava extends Test
 	function testMiscJavaLib()
 	function testMiscJavaLib()
 	{
 	{
 		//setting inline should be an error
 		//setting inline should be an error
-		t(TestType.typeError(Base.inlineNumber = 4));
+		t(HelperMacros.typeError(Base.inlineNumber = 4));
 	}
 	}
 
 
 	//TODO:
 	//TODO:

+ 152 - 0
tests/unit/src/unit/TestMain.hx

@@ -0,0 +1,152 @@
+package unit;
+
+import unit.Test.*;
+
+@:access(unit.Test)
+@:expose("unit.TestMain")
+class TestMain {
+
+	static var asyncWaits = new Array<haxe.PosInfos>();
+	static var asyncCache = new Array<Void -> Void>();
+
+	static function main() {
+	  var verbose = #if ( cpp || neko || php ) Sys.args().indexOf("-v") >= 0 #else false #end;
+
+		#if cs //"Turkey Test" - Issue #996
+		cs.system.threading.Thread.CurrentThread.CurrentCulture = new cs.system.globalization.CultureInfo('tr-TR');
+		cs.Lib.applyCultureChanges();
+		#end
+		#if neko
+		if( neko.Web.isModNeko )
+			neko.Web.setHeader("Content-Type","text/plain");
+		#elseif php
+		if( php.Web.isModNeko )
+			php.Web.setHeader("Content-Type","text/plain");
+		#end
+		resetTimer();
+		#if !macro
+		trace("Generated at: " + HelperMacros.getCompilationDate());
+		#end
+		trace("START");
+		#if flash
+		var tf : flash.text.TextField = untyped flash.Boot.getTrace();
+		tf.selectable = true;
+		tf.mouseEnabled = true;
+		#end
+		var classes = [
+			new TestOps(),
+			new TestBasetypes(),
+			new TestBytes(),
+			new TestIO(),
+			new TestLocals(),
+			new TestEReg(),
+			new TestXML(),
+			new TestMisc(),
+			new TestJson(),
+			new TestResource(),
+			new TestInt64(),
+			new TestReflect(),
+			new TestSerialize(),
+			new TestMeta(),
+			new TestType(),
+			new TestOrder(),
+			new TestGADT(),
+			new TestGeneric(),
+			#if !no_pattern_matching
+			new TestMatch(),
+			#end
+			new TestSpecification(),
+			#if cs
+			new TestCSharp(),
+			#end
+			#if java
+			new TestJava(),
+			#end
+			#if lua
+			new TestLua(),
+			#end
+			#if python
+			new TestPython(),
+			#end
+			#if hl
+			new TestHL(),
+			#end
+			#if php
+			new TestPhp(),
+			#end
+			#if (java || cs)
+			new TestOverloads(),
+			#end
+			// #if ((dce == "full") && !interp && !as3)
+			// new TestDCE(),
+			// #end
+			// #if ( (java || neko) && !macro && !interp)
+			// new TestThreads(),
+			// #end
+			//new TestUnspecified(),
+			//new TestRemoting(),
+		];
+
+
+		#if js
+		if (js.Browser.supported) {
+			classes.push(new TestJQuery());
+		}
+		#end
+
+		// SPOD tests
+		#if ( (neko || (php && (travis || appveyor || php_sqlite)) || java || cpp || (cs && (travis || appveyor))) && !macro && !interp)
+		#if ( (travis || appveyor) && !(cpp || cs) )
+		classes.push(new TestSpod(sys.db.Mysql.connect({
+			host : "127.0.0.1",
+			user : "travis",
+			pass : "",
+			port : 3306,
+			database : "haxe_test" })));
+		#end
+		if (verbose)
+			logVerbose("Setup sqlite");
+		classes.push(new TestSpod(sys.db.Sqlite.open("db.db3")));
+		#end
+		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));
+		}
+		#end
+	}
+}

+ 16 - 25
tests/unit/src/unit/TestMatch.hx

@@ -1,6 +1,7 @@
 package unit;
 package unit;
 import haxe.ds.Option;
 import haxe.ds.Option;
 import haxe.macro.Expr;
 import haxe.macro.Expr;
+import unit.HelperMacros.getErrorMessage;
 
 
 using unit.TestMatch;
 using unit.TestMatch;
 
 
@@ -33,16 +34,6 @@ typedef MiniRef<T> = {
 	public function get():T;
 	public function get():T;
 }
 }
 
 
-class TestMatchMacro {
-	static public macro function getErrorMessage(e:Expr) {
-		var result = try {
-			haxe.macro.Context.typeof(e);
-			"no error";
-		} catch (e:Dynamic) Std.string(e.message);
-		return macro $v{result};
-	}
-}
-
 class TestMatch extends Test {
 class TestMatch extends Test {
 
 
 	static function switchNormal(e:Expr):String {
 	static function switchNormal(e:Expr):String {
@@ -329,58 +320,58 @@ class TestMatch extends Test {
 	}
 	}
 
 
 	function testNonExhaustiveness() {
 	function testNonExhaustiveness() {
-		eq("Unmatched patterns: false", TestMatchMacro.getErrorMessage(switch(true) {
+		eq("Unmatched patterns: false", getErrorMessage(switch(true) {
 			case true:
 			case true:
 		}));
 		}));
-		eq("Unmatched patterns: OpNeg | OpNegBits", TestMatchMacro.getErrorMessage(switch(OpIncrement) {
+		eq("Unmatched patterns: OpNeg | OpNegBits", getErrorMessage(switch(OpIncrement) {
 			case OpIncrement:
 			case OpIncrement:
 			case OpDecrement:
 			case OpDecrement:
 			case OpNot:
 			case OpNot:
 		}));
 		}));
-		eq("Unmatched patterns: Node(Node, _)", TestMatchMacro.getErrorMessage(switch(Leaf("foo")) {
+		eq("Unmatched patterns: Node(Node, _)", getErrorMessage(switch(Leaf("foo")) {
 			case Node(Leaf("foo"), _):
 			case Node(Leaf("foo"), _):
 			case Leaf(_):
 			case Leaf(_):
 		}));
 		}));
-		eq("Unmatched patterns: Leaf", TestMatchMacro.getErrorMessage(switch(Leaf("foo")) {
+		eq("Unmatched patterns: Leaf", getErrorMessage(switch(Leaf("foo")) {
 			case Node(_, _):
 			case Node(_, _):
 			case Leaf(_) if (false):
 			case Leaf(_) if (false):
 		}));
 		}));
-		eq("Unmatched patterns: Leaf(_)", TestMatchMacro.getErrorMessage(switch(Leaf("foo")) {
+		eq("Unmatched patterns: Leaf(_)", getErrorMessage(switch(Leaf("foo")) {
 			case Node(_, _):
 			case Node(_, _):
 			case Leaf("foo"):
 			case Leaf("foo"):
 		}));
 		}));
-		eq("Unmatched patterns: false", TestMatchMacro.getErrorMessage(switch [1, true, "foo"] {
+		eq("Unmatched patterns: false", getErrorMessage(switch [1, true, "foo"] {
 			case [_, true, _]:
 			case [_, true, _]:
 		}));
 		}));
 		//var x:Null<Bool> = true;
 		//var x:Null<Bool> = true;
-		//eq("Unmatched patterns: null", TestMatchMacro.getErrorMessage(switch x {
+		//eq("Unmatched patterns: null", getErrorMessage(switch x {
 			//case true:
 			//case true:
 			//case false:
 			//case false:
 		//}));
 		//}));
 		//var t:Null<Tree<String>> = null;
 		//var t:Null<Tree<String>> = null;
-		//eq("Unmatched patterns: null", TestMatchMacro.getErrorMessage(switch t {
+		//eq("Unmatched patterns: null", getErrorMessage(switch t {
 			//case Leaf(_):
 			//case Leaf(_):
 			//case Node(_):
 			//case Node(_):
 		//}));
 		//}));
 	}
 	}
 
 
 	function testInvalidBinding() {
 	function testInvalidBinding() {
-		eq("Variable y must appear exactly once in each sub-pattern", TestMatchMacro.getErrorMessage(switch(Leaf("foo")) {
+		eq("Variable y must appear exactly once in each sub-pattern", getErrorMessage(switch(Leaf("foo")) {
 			case Leaf(x) | Leaf(y):
 			case Leaf(x) | Leaf(y):
 		}));
 		}));
-		eq("Variable y must appear exactly once in each sub-pattern", TestMatchMacro.getErrorMessage(switch(Leaf("foo")) {
+		eq("Variable y must appear exactly once in each sub-pattern", getErrorMessage(switch(Leaf("foo")) {
 			case Leaf(x) | Leaf(x) | Leaf(y):
 			case Leaf(x) | Leaf(x) | Leaf(y):
 		}));
 		}));
-		eq("Variable x must appear exactly once in each sub-pattern", TestMatchMacro.getErrorMessage(switch(Leaf("foo")) {
+		eq("Variable x must appear exactly once in each sub-pattern", getErrorMessage(switch(Leaf("foo")) {
 			case Leaf(x) | Leaf(x) | Leaf(_):
 			case Leaf(x) | Leaf(x) | Leaf(_):
 		}));
 		}));
-		eq("Variable l must appear exactly once in each sub-pattern", TestMatchMacro.getErrorMessage(switch(Leaf("foo")) {
+		eq("Variable l must appear exactly once in each sub-pattern", getErrorMessage(switch(Leaf("foo")) {
 			case Node(l = Leaf(x),_) | Node(Leaf(x), _):
 			case Node(l = Leaf(x),_) | Node(Leaf(x), _):
 		}));
 		}));
-		eq("Variable l is bound multiple times", TestMatchMacro.getErrorMessage(switch(Leaf("foo")) {
+		eq("Variable l is bound multiple times", getErrorMessage(switch(Leaf("foo")) {
 			case Node(l = Leaf(l), _):
 			case Node(l = Leaf(l), _):
 		}));
 		}));
-		eq("String should be unit.Tree<String>", TestMatchMacro.getErrorMessage(switch(Leaf("foo")) {
+		eq("String should be unit.Tree<String>", getErrorMessage(switch(Leaf("foo")) {
 			case Node(l = Leaf(_), _) | Leaf(l):
 			case Node(l = Leaf(_), _) | Leaf(l):
 			case _:
 			case _:
 		}));
 		}));
@@ -453,7 +444,7 @@ class TestMatch extends Test {
 		}
 		}
 		eq(r, 1);
 		eq(r, 1);
 
 
-		eq("Unmatched patterns: MethodNotAllowed", TestMatchMacro.getErrorMessage(switch(a) {
+		eq("Unmatched patterns: MethodNotAllowed", getErrorMessage(switch(a) {
 			case NotFound:
 			case NotFound:
 		}));
 		}));
 		#end
 		#end

+ 2 - 9
tests/unit/src/unit/TestMeta.hx

@@ -1,5 +1,7 @@
 package unit;
 package unit;
 
 
+import unit.HelperMacros.getMeta;
+
 @enumMeta private enum E {
 @enumMeta private enum E {
 	@a A;
 	@a A;
 	@b(0) B;
 	@b(0) B;
@@ -67,13 +69,4 @@ package unit;
 		eq(getMeta(@foo ("1")).args.length, 0);
 		eq(getMeta(@foo ("1")).args.length, 0);
 		eq(getMeta(@foo("1") "2").args.length, 1);
 		eq(getMeta(@foo("1") "2").args.length, 1);
 	}
 	}
-
-	static macro function getMeta(e) {
-		switch(e.expr) {
-			case EMeta(m, _):
-				return macro { name: $v{m.name}, args: $a{m.params} };
-			default:
-				return macro report("Metadata expected");
-		}
-	}
 }
 }

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

@@ -18,7 +18,7 @@ class TestOrder extends Test {
 
 
 		// Latest enum should be used
 		// Latest enum should be used
 		var c:E2 = E2.C1;
 		var c:E2 = E2.C1;
-		TestType.typedAs(C1, c);
+		HelperMacros.typedAs(C1, c);
 		eq(c, C1);
 		eq(c, C1);
 	}
 	}
 }
 }

+ 2 - 2
tests/unit/src/unit/TestOverloads.hx

@@ -1,7 +1,7 @@
 package unit;
 package unit;
 import haxe.io.Bytes;
 import haxe.io.Bytes;
-import unit.TestType.typeError;
-import unit.TestType.typedAs;
+import unit.HelperMacros.typeError;
+import unit.HelperMacros.typedAs;
 using unit.TestOverloads.UsingTest2;
 using unit.TestOverloads.UsingTest2;
 using unit.TestOverloads.UsingTest3;
 using unit.TestOverloads.UsingTest3;
 
 

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

@@ -1,6 +1,7 @@
 package unit;
 package unit;
 import unit.MyEnum;
 import unit.MyEnum;
 import unit.MyClass;
 import unit.MyClass;
+import unit.HelperMacros.*;
 
 
 class TestType extends Test {
 class TestType extends Test {
 
 
@@ -12,38 +13,6 @@ class TestType extends Test {
 		#end
 		#end
 	}
 	}
 
 
-	static public macro function getCompilationDate() {
-		return macro $v { Std.string(Date.now()) };
-	}
-
-	static public macro function typedAs(actual:haxe.macro.Expr, expected:haxe.macro.Expr) {
-		var tExpected = haxe.macro.Context.typeof(expected);
-		var tActual = haxe.macro.Context.typeof(actual);
-		return haxe.macro.Context.parse("eq('" +Std.string(tActual) + "', '" +Std.string(tExpected) + "')", haxe.macro.Context.currentPos());
-	}
-
-	static public macro function typeError(e:haxe.macro.Expr) {
-		var result = try {
-			haxe.macro.Context.typeof(e);
-			"false";
-		} catch (e:Dynamic) "true";
-		return { pos: haxe.macro.Context.currentPos(), expr: haxe.macro.Expr.ExprDef.EConst(haxe.macro.Expr.Constant.CIdent(result)) };
-	}
-
-	static public macro function typeErrorText(e:haxe.macro.Expr) {
-		var result = try {
-			haxe.macro.Context.typeof(e);
-			null;
-		} catch (e:haxe.macro.Expr.Error) e.message;
-		return {
-			pos: haxe.macro.Context.currentPos(),
-			expr: if (result == null)
-					haxe.macro.Expr.ExprDef.EConst(haxe.macro.Expr.Constant.CIdent("null"))
-				else
-					haxe.macro.Expr.ExprDef.EConst(haxe.macro.Expr.Constant.CString(result))
-		};
-	}
-
 	public function testType() {
 	public function testType() {
 		var name = u("unit")+"."+u("MyClass");
 		var name = u("unit")+"."+u("MyClass");
 		eq( Type.resolveClass(name), unit.MyClass );
 		eq( Type.resolveClass(name), unit.MyClass );

+ 9 - 9
tests/unit/src/unit/issues/Issue2063.hx

@@ -14,15 +14,15 @@ class Issue2063 extends Test {
 		var y:{a:A} = {a:untyped 9};
 		var y:{a:A} = {a:untyped 9};
 		var z:{a:B} = {a:untyped 9};
 		var z:{a:B} = {a:untyped 9};
 		var w:{a:C} = {a:untyped 9};
 		var w:{a:C} = {a:untyped 9};
-		t(unit.TestType.typeError(x = y));
-		t(unit.TestType.typeError(y = x));
-		t(unit.TestType.typeError(x = z));
+		t(unit.HelperMacros.typeError(x = y));
+		t(unit.HelperMacros.typeError(y = x));
+		t(unit.HelperMacros.typeError(x = z));
 		z = x;
 		z = x;
 		x = w;
 		x = w;
-		t(unit.TestType.typeError(w = x));
+		t(unit.HelperMacros.typeError(w = x));
 
 
 		// should fail (transitive cast)
 		// should fail (transitive cast)
-		t(unit.TestType.typeError(z = w));
+		t(unit.HelperMacros.typeError(z = w));
 
 
 		// should succeed
 		// should succeed
 		var p = {xs:[0,1,2]};
 		var p = {xs:[0,1,2]};
@@ -34,8 +34,8 @@ class Issue2063 extends Test {
 
 
 		// should fail (transitive cast)
 		// should fail (transitive cast)
 		var p = {xs:[0,1,2]};
 		var p = {xs:[0,1,2]};
-		t(unit.TestType.typeError(var q:{xs:Arr<Float>} = p));
-		t(unit.TestType.typeError(p = q));
+		t(unit.HelperMacros.typeError(var q:{xs:Arr<Float>} = p));
+		t(unit.HelperMacros.typeError(p = q));
 
 
 		// should succeed
 		// should succeed
 		var p = {xs:[0,1,2]};
 		var p = {xs:[0,1,2]};
@@ -44,7 +44,7 @@ class Issue2063 extends Test {
 
 
 		// should fail (wrong param)
 		// should fail (wrong param)
 		var p = {xs:[0.0,1.0,2.0]};
 		var p = {xs:[0.0,1.0,2.0]};
-		t(unit.TestType.typeError(var q:{xs:Brr<String>} = p));
-		t(unit.TestType.typeError(p = q));
+		t(unit.HelperMacros.typeError(var q:{xs:Brr<String>} = p));
+		t(unit.HelperMacros.typeError(p = q));
 	}
 	}
 }
 }

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

@@ -21,6 +21,6 @@ private abstract False(Bool) {
 class Issue2157 extends Test {
 class Issue2157 extends Test {
 	function test() {
 	function test() {
 		var x : False = true;
 		var x : False = true;
-		t(unit.TestType.typeError(var z : Choice<False, Int> = true));
+		t(unit.HelperMacros.typeError(var z : Choice<False, Int> = true));
 	}
 	}
 }
 }

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

@@ -8,6 +8,6 @@ private abstract BoxedInt({ val : Int }) from { val : Int } {
 class Issue2184 extends Test {
 class Issue2184 extends Test {
 	function test() {
 	function test() {
 		var test = function () return new BoxedInt({ val : 5 });
 		var test = function () return new BoxedInt({ val : 5 });
-		t(unit.TestType.typeError(var z:Void->Int = test));
+		t(unit.HelperMacros.typeError(var z:Void->Int = test));
 	}
 	}
 }
 }

+ 4 - 4
tests/unit/src/unit/issues/Issue2235.hx

@@ -9,9 +9,9 @@ private abstract A(Int) from Int {
 class Issue2235 extends Test {
 class Issue2235 extends Test {
 	function test() {
 	function test() {
 		var a:A = 0;
 		var a:A = 0;
-		t(unit.TestType.typeError(a.f()));
-		t(unit.TestType.typeError(a.f));
-		t(unit.TestType.typeError(A.fs()));
-		t(unit.TestType.typeError(A.fs));
+		t(unit.HelperMacros.typeError(a.f()));
+		t(unit.HelperMacros.typeError(a.f));
+		t(unit.HelperMacros.typeError(A.fs()));
+		t(unit.HelperMacros.typeError(A.fs));
 	}
 	}
 }
 }

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

@@ -17,6 +17,6 @@ class Issue2343 extends unit.Test {
 		eq(1, foo.result);
 		eq(1, foo.result);
 
 
 		// we cannot actually test this because it is delayed
 		// we cannot actually test this because it is delayed
-		//t(unit.TestType.typeError(var foo2 = new Foo<String>("1")));
+		//t(unit.HelperMacros.typeError(var foo2 = new Foo<String>("1")));
 	}
 	}
 }
 }

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

@@ -2,11 +2,13 @@ package unit.issues;
 import unit.Test;
 import unit.Test;
 
 
 class Issue2521 extends Test {
 class Issue2521 extends Test {
+	#if !macro
 	function test() {
 	function test() {
 		eq("haxe.macro.Expr", getType("haxe.macro.Expr"));
 		eq("haxe.macro.Expr", getType("haxe.macro.Expr"));
 		eq("haxe.macro.Expr", getType("haxe.macro.Expr.Expr"));
 		eq("haxe.macro.Expr", getType("haxe.macro.Expr.Expr"));
 		eq("haxe.macro.ExprOf<Unknown<0>>", getType("haxe.macro.Expr.ExprOf"));
 		eq("haxe.macro.ExprOf<Unknown<0>>", getType("haxe.macro.Expr.ExprOf"));
 	}
 	}
+	#end
 
 
 	macro static function getType(s:String) {
 	macro static function getType(s:String) {
 		var t = haxe.macro.Context.getType(s);
 		var t = haxe.macro.Context.getType(s);

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

@@ -37,7 +37,7 @@ class Issue2584 extends Test {
 		eq("foo", b.x);
 		eq("foo", b.x);
 
 
 		var a : { x: XX } = { x: new XX("foo") };
 		var a : { x: XX } = { x: new XX("foo") };
-		t(unit.TestType.typeError((a : { x: String })));
+		t(unit.HelperMacros.typeError((a : { x: String })));
 	}
 	}
 
 
 	function test2() {
 	function test2() {
@@ -63,6 +63,6 @@ class Issue2584 extends Test {
 		var a : Array<Option<{ x : String}>> = x;
 		var a : Array<Option<{ x : String}>> = x;
 
 
 		var xx : Array<Option<{ x : XX}>> = null;
 		var xx : Array<Option<{ x : XX}>> = null;
-		t(unit.TestType.typeError((xx : Array<Option<{ x : String}>>)));
+		t(unit.HelperMacros.typeError((xx : Array<Option<{ x : String}>>)));
 	}
 	}
 }
 }

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

@@ -22,8 +22,8 @@ class Issue2614 extends Test {
 		var fFloat = lazy(2.);
 		var fFloat = lazy(2.);
 		eq(fInt.evaluate(), 2);
 		eq(fInt.evaluate(), 2);
 		feq(fFloat.evaluate(), 2.);
 		feq(fFloat.evaluate(), 2.);
-		unit.TestType.typedAs(fInt, (null : Lazy<Int>));
-		unit.TestType.typedAs(fFloat, (null : Lazy<Float>));
+		unit.HelperMacros.typedAs(fInt, (null : Lazy<Int>));
+		unit.HelperMacros.typedAs(fFloat, (null : Lazy<Float>));
 	}
 	}
 
 
 	static public function lazy<A>(l:Lazy<A>):Lazy<A> {
 	static public function lazy<A>(l:Lazy<A>):Lazy<A> {

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

@@ -25,7 +25,7 @@ class Issue2619 extends Test {
 		}
 		}
 		eq("foo", s);
 		eq("foo", s);
 
 
-		t(unit.TestType.typeError(
+		t(unit.HelperMacros.typeError(
 			try { }
 			try { }
 			catch(e:A) { }
 			catch(e:A) { }
 			catch(e:B) { }
 			catch(e:B) { }

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

@@ -5,13 +5,13 @@ using unit.issues.Issue2625;
 
 
 class Issue2625 extends Test {
 class Issue2625 extends Test {
 	function test() {
 	function test() {
-		t(unit.TestType.typeError(
+		t(unit.HelperMacros.typeError(
 			switch(1) {
 			switch(1) {
 				case (_.equals(2) => true) | (_.equals(3) => false):
 				case (_.equals(2) => true) | (_.equals(3) => false):
 			}
 			}
 		));
 		));
 
 
-		t(unit.TestType.typeError(
+		t(unit.HelperMacros.typeError(
 			switch(1) {
 			switch(1) {
 				case (_.equals(2) => true), (_.equals(3) => false):
 				case (_.equals(2) => true), (_.equals(3) => false):
 			}
 			}

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

@@ -19,7 +19,7 @@ private abstract A<T>(Int) {
 class Issue2639 extends Test {
 class Issue2639 extends Test {
 	public function test() {
 	public function test() {
 		var a:A<Int>;
 		var a:A<Int>;
-		t(unit.TestType.typeError(a = 0));
+		t(unit.HelperMacros.typeError(a = 0));
 		var b:A<String> = "foo";
 		var b:A<String> = "foo";
 		eq(3, b.get());
 		eq(3, b.get());
 	}
 	}

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

@@ -66,7 +66,7 @@ class Issue2661 extends Test {
 		eq(10, new A1(i++) % new AChild(i++));
 		eq(10, new A1(i++) % new AChild(i++));
 		eq(12, i);
 		eq(12, i);
 
 
-		t(unit.TestType.typeError(new AChild(1) - new A1(0)));
-		t(unit.TestType.typeError(new AChild(1) % new A1(1)));
+		t(unit.HelperMacros.typeError(new AChild(1) - new A1(0)));
+		t(unit.HelperMacros.typeError(new AChild(1) % new A1(1)));
 	}
 	}
 }
 }

+ 3 - 3
tests/unit/src/unit/issues/Issue2675.hx

@@ -7,19 +7,19 @@ private class Child extends Base {}
 
 
 class Issue2675 extends Test {
 class Issue2675 extends Test {
 	function test() {
 	function test() {
-		t(unit.TestType.typeError(
+		t(unit.HelperMacros.typeError(
 			try { }
 			try { }
 			catch(e:Base) { }
 			catch(e:Base) { }
 			catch(e:Child) { }
 			catch(e:Child) { }
 		));
 		));
 
 
-		t(unit.TestType.typeError(
+		t(unit.HelperMacros.typeError(
 			try { }
 			try { }
 			catch(e:Dynamic) { }
 			catch(e:Dynamic) { }
 			catch(e:Child) { }
 			catch(e:Child) { }
 		));
 		));
 
 
-		t(unit.TestType.typeError(
+		t(unit.HelperMacros.typeError(
 			try { }
 			try { }
 			catch(e:Dynamic) { }
 			catch(e:Dynamic) { }
 			catch(e:Dynamic) { }
 			catch(e:Dynamic) { }

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

@@ -28,10 +28,10 @@ class Issue2750 extends Parent {
 		eq(3, bind());
 		eq(3, bind());
 		eq(3, match());
 		eq(3, match());
 		call(this);
 		call(this);
-		t(unit.TestType.typeError(var x = super));
-		t(unit.TestType.typeError(call(super)));
-		t(unit.TestType.typeError({ field: super }));
-		t(unit.TestType.typeError([super]));
+		t(unit.HelperMacros.typeError(var x = super));
+		t(unit.HelperMacros.typeError(call(super)));
+		t(unit.HelperMacros.typeError({ field: super }));
+		t(unit.HelperMacros.typeError([super]));
 	}
 	}
 
 
 	override function foo() {
 	override function foo() {

+ 3 - 3
tests/unit/src/unit/issues/Issue2776.hx

@@ -8,17 +8,17 @@ class Issue2776 extends Test {
 			case String:
 			case String:
 			case Int:
 			case Int:
 		}
 		}
-		unit.TestType.typedAs(type, getClassT());
+		unit.HelperMacros.typedAs(type, getClassT());
 
 
 		var type = null;
 		var type = null;
 		switch(type) {
 		switch(type) {
 			case haxe.macro.Expr.ExprDef:
 			case haxe.macro.Expr.ExprDef:
 			case haxe.macro.Expr.Constant:
 			case haxe.macro.Expr.Constant:
 		}
 		}
-		unit.TestType.typedAs(type, getEnumT());
+		unit.HelperMacros.typedAs(type, getEnumT());
 
 
 		var type = null;
 		var type = null;
-		t(unit.TestType.typeError(switch(type) {
+		t(unit.HelperMacros.typeError(switch(type) {
 			case String:
 			case String:
 			case haxe.macro.Expr.ExprDef:
 			case haxe.macro.Expr.ExprDef:
 		}));
 		}));

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

@@ -13,8 +13,8 @@ class Issue2778 extends Test {
 		eq(false, sameType(BoolLit(true), BoolLit(false)));
 		eq(false, sameType(BoolLit(true), BoolLit(false)));
 		eq(false, sameType(BoolLit(false), BoolLit(false)));
 		eq(false, sameType(BoolLit(false), BoolLit(false)));
 		eq(12, sameType(IntLit(1), IntLit(11)));
 		eq(12, sameType(IntLit(1), IntLit(11)));
-		t(unit.TestType.typeError(sameType(IntLit(1), BoolLit(true))));
-		t(unit.TestType.typeError(sameType(BoolLit(true), IntLit(1))));
+		t(unit.HelperMacros.typeError(sameType(IntLit(1), BoolLit(true))));
+		t(unit.HelperMacros.typeError(sameType(BoolLit(true), IntLit(1))));
 	}
 	}
 
 
 	static function sameType<S>(o1:E<S>, o2:E<S>):S {
 	static function sameType<S>(o1:E<S>, o2:E<S>):S {

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

@@ -27,6 +27,6 @@ class Issue2786 extends Test {
 	function test() {
 	function test() {
 		var a:E = A | B;
 		var a:E = A | B;
 		eq(3, a);
 		eq(3, a);
-		t(unit.TestType.typeError((A | B : E2)));
+		t(unit.HelperMacros.typeError((A | B : E2)));
 	}
 	}
 }
 }

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

@@ -18,7 +18,7 @@ class Issue2813 extends Test {
 		var f = Ext.test2;
 		var f = Ext.test2;
 		eq("foo", f());
 		eq("foo", f());
 
 
-		t(unit.TestType.typeError({
+		t(unit.HelperMacros.typeError({
 			var e = new Ext();
 			var e = new Ext();
 			var f = e.test;
 			var f = e.test;
 		}));
 		}));

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

@@ -3,7 +3,7 @@ import unit.Test;
 
 
 class Issue2844 extends Test {
 class Issue2844 extends Test {
 	function test() {
 	function test() {
-		t(unit.TestType.typeError({
+		t(unit.HelperMacros.typeError({
 			var a:Array<Int> = [];
 			var a:Array<Int> = [];
 			var b:Array<Float> = a;
 			var b:Array<Float> = a;
 		}));
 		}));

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

@@ -11,7 +11,7 @@ class Issue2859 extends Test {
 		try {
 		try {
 			throw new Error("hello");
 			throw new Error("hello");
 		} catch (e:Error) {
 		} catch (e:Error) {
-			unit.TestType.typedAs(e, (null:Error));
+			unit.HelperMacros.typedAs(e, (null:Error));
 			func(e);
 			func(e);
 		}
 		}
 	}
 	}

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

@@ -17,7 +17,7 @@ class Issue2907 extends Test {
 	}
 	}
 
 
 	function test<T>() {
 	function test<T>() {
-		t(unit.TestType.typeError(
+		t(unit.HelperMacros.typeError(
 			try { }
 			try { }
 			catch(e:T) { }
 			catch(e:T) { }
 		));
 		));

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

@@ -4,7 +4,7 @@ class Issue2914 extends Test {
 	function test() {
 	function test() {
 		var o:Null<Int> = 0;
 		var o:Null<Int> = 0;
 
 
-		t(unit.TestType.typeError({
+		t(unit.HelperMacros.typeError({
 			var x = switch o {
 			var x = switch o {
 				case x if (x > 1): x;
 				case x if (x > 1): x;
 			}
 			}

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

@@ -12,6 +12,6 @@ class Issue2939 extends Test {
 	function test() {
 	function test() {
 		eq(1, a);
 		eq(1, a);
 		eq(2, b);
 		eq(2, b);
-		t(unit.TestType.typeError(c));
+		t(unit.HelperMacros.typeError(c));
 	}
 	}
 }
 }

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

@@ -11,7 +11,7 @@ class Issue2979 extends Test {
 	function test() {
 	function test() {
 		var b:B<String> = null;
 		var b:B<String> = null;
 		var a:A<String>;
 		var a:A<String>;
-		unit.TestType.typedAs(a, b.a());
-		unit.TestType.typedAs(a, b.toA());
+		unit.HelperMacros.typedAs(a, b.a());
+		unit.HelperMacros.typedAs(a, b.toA());
 	}
 	}
 }
 }

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

@@ -19,7 +19,7 @@ class Issue3054 extends Test {
 		}
 		}
 
 
 		var myOtherValue:Null<MyOtherEnum> = B;
 		var myOtherValue:Null<MyOtherEnum> = B;
-		t(unit.TestType.typeError(switch(myOtherValue) {
+		t(unit.HelperMacros.typeError(switch(myOtherValue) {
 			case A(A):
 			case A(A):
 			case A(B):
 			case A(B):
 			case B:
 			case B:

+ 3 - 3
tests/unit/src/unit/issues/Issue3089.hx

@@ -7,8 +7,8 @@ private class GenericBuild<Rest> { }
 
 
 class Issue3089 extends Test {
 class Issue3089 extends Test {
 	function test() {
 	function test() {
-		unit.TestType.typedAs((null:GenericBuild), (null:GenericBuildResult<"">));
-		unit.TestType.typedAs((null:GenericBuild<String>), (null:GenericBuildResult<"String">));
-		unit.TestType.typedAs((null:GenericBuild<String, Int, Float>), (null:GenericBuildResult<"String_Int_Float">));
+		unit.HelperMacros.typedAs((null:GenericBuild), (null:GenericBuildResult<"">));
+		unit.HelperMacros.typedAs((null:GenericBuild<String>), (null:GenericBuildResult<"String">));
+		unit.HelperMacros.typedAs((null:GenericBuild<String, Int, Float>), (null:GenericBuildResult<"String_Int_Float">));
 	}
 	}
 }
 }

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

@@ -5,7 +5,7 @@ private abstract MyOpaciteInt(Int) {}
 class Issue3110 extends Test {
 class Issue3110 extends Test {
 	function test() {
 	function test() {
 		var o:List<MyOpaciteInt> = null;
 		var o:List<MyOpaciteInt> = null;
-		t(unit.TestType.typeError({
+		t(unit.HelperMacros.typeError({
 			var u:List<UInt> = o;
 			var u:List<UInt> = o;
 		}));
 		}));
 	}
 	}

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

@@ -4,7 +4,7 @@ class Issue3132 extends unit.Test {
 	function test() {
 	function test() {
 		var a:Array<{a:Int, ?b:Int}> = [{a:1}, {a:1, b:2}];
 		var a:Array<{a:Int, ?b:Int}> = [{a:1}, {a:1, b:2}];
 		var a:Array<{a:Int, ?b:Int}> = [{a:1, b:2}, {a:1}];
 		var a:Array<{a:Int, ?b:Int}> = [{a:1, b:2}, {a:1}];
-		//t(unit.TestType.typeError([{a:1}, {a:1, b:2}]));
-		//t(unit.TestType.typeError([{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}]));
 	}
 	}
 }
 }

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

@@ -2,7 +2,7 @@ package unit.issues;
 
 
 class Issue3150 extends Test {
 class Issue3150 extends Test {
 	function test() {
 	function test() {
-		t(unit.TestType.typeError(
+		t(unit.HelperMacros.typeError(
 			var d = switch (2) {
 			var d = switch (2) {
 				case 3: 90;
 				case 3: 90;
 				case f if (f == 0 | 2): -135;
 				case f if (f == 0 | 2): -135;

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

@@ -5,7 +5,7 @@ package unit.issues;
 class Issue3181 extends Test {
 class Issue3181 extends Test {
 	function test() {
 	function test() {
 		var a:Null<A> = cast 1;
 		var a:Null<A> = cast 1;
-		t(unit.TestType.typeError(
+		t(unit.HelperMacros.typeError(
 			switch(a) { }
 			switch(a) { }
 		));
 		));
 	}
 	}

+ 3 - 3
tests/unit/src/unit/issues/Issue3183.hx

@@ -6,17 +6,17 @@ class MyTuple<Rest> { }
 class Issue3183 extends Test {
 class Issue3183 extends Test {
 	function test() {
 	function test() {
 		var t = new MyTuple<String, Int>("foo", 12);
 		var t = new MyTuple<String, Int>("foo", 12);
-		unit.TestType.typedAs(t, (null : MyTuple<String, Int>));
+		unit.HelperMacros.typedAs(t, (null : MyTuple<String, Int>));
 		eq("foo", t.v0);
 		eq("foo", t.v0);
 		eq(12, t.v1);
 		eq(12, t.v1);
 
 
 		var t = new MyTuple("foo", 12);
 		var t = new MyTuple("foo", 12);
-		unit.TestType.typedAs(t, (null : MyTuple<String, Int>));
+		unit.HelperMacros.typedAs(t, (null : MyTuple<String, Int>));
 		eq("foo", t.v0);
 		eq("foo", t.v0);
 		eq(12, t.v1);
 		eq(12, t.v1);
 
 
 		var t:MyTuple = new MyTuple("foo", 12);
 		var t:MyTuple = new MyTuple("foo", 12);
-		unit.TestType.typedAs(t, (null : MyTuple<String, Int>));
+		unit.HelperMacros.typedAs(t, (null : MyTuple<String, Int>));
 		eq("foo", t.v0);
 		eq("foo", t.v0);
 		eq(12, t.v1);
 		eq(12, t.v1);
 	}
 	}

+ 3 - 3
tests/unit/src/unit/issues/Issue3347.hx

@@ -48,12 +48,12 @@ class Issue3347 extends Test {
 		eq("0;0;0;0;0;2;", IntKey.fromList);
 		eq("0;0;0;0;0;2;", IntKey.fromList);
 		eq(4, m[0]);
 		eq(4, m[0]);
 
 
-		t(unit.TestType.typeError(m["1"] = 1));
-		t(unit.TestType.typeError(m[1] = "1"));
+		t(unit.HelperMacros.typeError(m["1"] = 1));
+		t(unit.HelperMacros.typeError(m[1] = "1"));
 
 
 		var m2 = new IntMap2();
 		var m2 = new IntMap2();
 		// should fail because constraints unify without casts
 		// should fail because constraints unify without casts
-		t(unit.TestType.typeError(m2[1]));
+		t(unit.HelperMacros.typeError(m2[1]));
 
 
 		var m3 = new IntMap3();
 		var m3 = new IntMap3();
 		var v = m3[0];
 		var v = m3[0];

+ 3 - 3
tests/unit/src/unit/issues/Issue3360.hx

@@ -36,18 +36,18 @@ class Issue3360 extends Test {
 		var q1 = new Quat(0,0,0,1);
 		var q1 = new Quat(0,0,0,1);
 
 
 		var res = q0 * v;
 		var res = q0 * v;
-		unit.TestType.typedAs(res, (null : Vec3));
+		unit.HelperMacros.typedAs(res, (null : Vec3));
 		feq(1, res[0]);
 		feq(1, res[0]);
 		feq(2, res[1]);
 		feq(2, res[1]);
 		feq(3, res[2]);
 		feq(3, res[2]);
 		var res = q0 * q1;
 		var res = q0 * q1;
-		unit.TestType.typedAs(res, (null : Quat));
+		unit.HelperMacros.typedAs(res, (null : Quat));
 		feq(1, res[0]);
 		feq(1, res[0]);
 		feq(2, res[1]);
 		feq(2, res[1]);
 		feq(3, res[2]);
 		feq(3, res[2]);
 		feq(1, res[3]);
 		feq(1, res[3]);
 
 
 		var k:Kilometer = 1;
 		var k:Kilometer = 1;
-		t(unit.TestType.typeError(var m:Meter = k));
+		t(unit.HelperMacros.typeError(var m:Meter = k));
 	}
 	}
 }
 }

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

@@ -3,7 +3,7 @@ package unit.issues;
 class Issue3391 extends Test {
 class Issue3391 extends Test {
 	function test() {
 	function test() {
 		var v = false;
 		var v = false;
-		t(unit.TestType.typeError(
+		t(unit.HelperMacros.typeError(
 			var a:Int = switch (v) {
 			var a:Int = switch (v) {
 				case true:
 				case true:
 				case false:
 				case false:

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

@@ -8,7 +8,7 @@ class Issue3396 extends Test {
 		Reflect.makeVarArgs(f);
 		Reflect.makeVarArgs(f);
 		Reflect.makeVarArgs(f2);
 		Reflect.makeVarArgs(f2);
 		var s:String = f([]);
 		var s:String = f([]);
-		unit.TestType.typedAs(r, (r:String));
-		unit.TestType.typedAs(f2([]), (null:Void));
+		unit.HelperMacros.typedAs(r, (r:String));
+		unit.HelperMacros.typedAs(f2([]), (null:Void));
 	}
 	}
 }
 }

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

@@ -47,8 +47,8 @@ private class ClassWithConstructorThatCallsChild extends ClassWithConstructorTha
 
 
 class Issue3596 extends Test {
 class Issue3596 extends Test {
 	function test() {
 	function test() {
-		t(unit.TestType.typeError(new ClassWithInitButNoConstructor()));
-		t(unit.TestType.typeError(new ClassWithInitButNoConstructorChild()));
+		t(unit.HelperMacros.typeError(new ClassWithInitButNoConstructor()));
+		t(unit.HelperMacros.typeError(new ClassWithInitButNoConstructorChild()));
 
 
 		//var c = new ClassWithInitAndConstructorChild();
 		//var c = new ClassWithInitAndConstructorChild();
 		//eq(1, c.a);
 		//eq(1, c.a);

+ 4 - 4
tests/unit/src/unit/issues/Issue3616.hx

@@ -18,13 +18,13 @@ private abstract C(Null<Int>) {
 class Issue3616 extends Test {
 class Issue3616 extends Test {
 	function test() {
 	function test() {
 		var v:A = null;
 		var v:A = null;
-		eq(unit.TestType.typeErrorText(v.f(1)), "Invalid call to static function f through abstract instance");
+		eq(unit.HelperMacros.typeErrorText(v.f(1)), "Invalid call to static function f through abstract instance");
 
 
 		var v = B.f(10);
 		var v = B.f(10);
-		eq(unit.TestType.typeErrorText(v.f()), "Invalid call to static function f through abstract instance");
+		eq(unit.HelperMacros.typeErrorText(v.f()), "Invalid call to static function f through abstract instance");
 
 
 		var v:C = null;
 		var v:C = null;
-		eq(unit.TestType.typeErrorText(v.f), "Invalid call to static function f through abstract instance");
-		eq(unit.TestType.typeErrorText(v.f = 5), "Invalid call to static function f through abstract instance");
+		eq(unit.HelperMacros.typeErrorText(v.f), "Invalid call to static function f through abstract instance");
+		eq(unit.HelperMacros.typeErrorText(v.f = 5), "Invalid call to static function f through abstract instance");
 	}
 	}
 }
 }

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

@@ -17,7 +17,7 @@ class Issue3635 extends Test {
 		dB.key = { x: 10 };
 		dB.key = { x: 10 };
 		dB = { key: b };
 		dB = { key: b };
 
 
-		t(unit.TestType.typeError(dA = { key: { y: 120 } }));
-		t(unit.TestType.typeError(dB = { key: { y: 120 } }));
+		t(unit.HelperMacros.typeError(dA = { key: { y: 120 } }));
+		t(unit.HelperMacros.typeError(dB = { key: { y: 120 } }));
 	}
 	}
 }
 }

+ 4 - 4
tests/unit/src/unit/issues/Issue3714.hx

@@ -7,9 +7,9 @@ private class A {
 
 
 class Issue3714 extends Test {
 class Issue3714 extends Test {
 	function test() {
 	function test() {
-		eq(unit.TestType.typeErrorText(A.f), "Cannot access private field f");
-		eq(unit.TestType.typeErrorText(@:privateAccess A.f), null);
-		eq(unit.TestType.typeErrorText(@:privateAccess A.f(A.a)), null);
-		eq(unit.TestType.typeErrorText(@:privateAccess A.f(@:noPrivateAccess A.a)), "Cannot access private field a\nFor function argument 'a'");
+		eq(unit.HelperMacros.typeErrorText(A.f), "Cannot access private field f");
+		eq(unit.HelperMacros.typeErrorText(@:privateAccess A.f), null);
+		eq(unit.HelperMacros.typeErrorText(@:privateAccess A.f(A.a)), null);
+		eq(unit.HelperMacros.typeErrorText(@:privateAccess A.f(@:noPrivateAccess A.a)), "Cannot access private field a\nFor function argument 'a'");
 	}
 	}
 }
 }

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

@@ -4,7 +4,7 @@ class Issue3894 extends Test {
 	function test() {
 	function test() {
 		#if (flash || cs || java || cpp)
 		#if (flash || cs || java || cpp)
 		// this doesn't actually error until post-processing so we cannot test it like this
 		// this doesn't actually error until post-processing so we cannot test it like this
-		//t(unit.TestType.typeError((null : haxe.Int64)));
+		//t(unit.HelperMacros.typeError((null : haxe.Int64)));
 		#end
 		#end
 	}
 	}
 }
 }

+ 4 - 4
tests/unit/src/unit/issues/Issue3935.hx

@@ -24,11 +24,11 @@ class Issue3935 extends Test {
 	}
 	}
 
 
 	function testFail() {
 	function testFail() {
-		t(unit.TestType.typeError([1=>2, 3=>"4"]));
-		t(unit.TestType.typeError(["1"=>2, "3"=>"4"]));
+		t(unit.HelperMacros.typeError([1=>2, 3=>"4"]));
+		t(unit.HelperMacros.typeError(["1"=>2, "3"=>"4"]));
 		var m = new MyClass();
 		var m = new MyClass();
 		var m2 = new MyClass();
 		var m2 = new MyClass();
-		t(unit.TestType.typeError([m => 1, m2 => "1"]));
-		t(unit.TestType.typeError([EBreak => 1, EContinue => "2"]));
+		t(unit.HelperMacros.typeError([m => 1, m2 => "1"]));
+		t(unit.HelperMacros.typeError([EBreak => 1, EContinue => "2"]));
 	}
 	}
 }
 }

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

@@ -12,9 +12,9 @@ class Issue4121 extends Test {
 		eq("(@:test (@:test2 ((x) = (@:test3 (1)))))", wrap(@:test @:test2 x = @:test3 1));
 		eq("(@:test (@:test2 ((x) = (@:test3 (1)))))", wrap(@:test @:test2 x = @:test3 1));
 
 
 		var p2:P2 = { hidden: 12 };
 		var p2:P2 = { hidden: 12 };
-		t(unit.TestType.typeError(p2.hidden));
+		t(unit.HelperMacros.typeError(p2.hidden));
 		eq(12, @:privateAccess p2.hidden);
 		eq(12, @:privateAccess p2.hidden);
-		t(unit.TestType.typeError(p2.hidden = 13));
+		t(unit.HelperMacros.typeError(p2.hidden = 13));
 		@:privateAccess p2.hidden = 13;
 		@:privateAccess p2.hidden = 13;
 		eq(13, @:privateAccess p2.hidden);
 		eq(13, @:privateAccess p2.hidden);
 	}
 	}

+ 4 - 4
tests/unit/src/unit/issues/Issue4122.hx

@@ -12,13 +12,13 @@ private abstract Test3(Int) {
 class Issue4122 extends Test {
 class Issue4122 extends Test {
 	function test() {
 	function test() {
 		eq(130, Test2.PROP + 7);
 		eq(130, Test2.PROP + 7);
-		unit.TestType.typedAs(Test2.PROP + 7, 7);
+		unit.HelperMacros.typedAs(Test2.PROP + 7, 7);
 		feq(130.5, Test2.PROP + 7.5);
 		feq(130.5, Test2.PROP + 7.5);
-		unit.TestType.typedAs(Test2.PROP + 7.5, 7.5);
+		unit.HelperMacros.typedAs(Test2.PROP + 7.5, 7.5);
 
 
 		eq(130, Test3.PROP + 7);
 		eq(130, Test3.PROP + 7);
-		unit.TestType.typedAs(Test3.PROP + 7, 7);
+		unit.HelperMacros.typedAs(Test3.PROP + 7, 7);
 		feq(130.5, Test3.PROP + 7.5);
 		feq(130.5, Test3.PROP + 7.5);
-		unit.TestType.typedAs(Test3.PROP + 7.5, 7.5);
+		unit.HelperMacros.typedAs(Test3.PROP + 7.5, 7.5);
 	}
 	}
 }
 }

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

@@ -7,6 +7,6 @@ class Issue4196 extends Test {
 			'b' => {"id": {}}
 			'b' => {"id": {}}
 		];
 		];
 		var a:Map<String, {id:{}}>;
 		var a:Map<String, {id:{}}>;
-		unit.TestType.typedAs(f, a);
+		unit.HelperMacros.typedAs(f, a);
 	}
 	}
 }
 }

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

@@ -2,7 +2,7 @@ package unit.issues;
 
 
 class Issue4277 extends Test {
 class Issue4277 extends Test {
 	function test() {
 	function test() {
-		t(unit.TestType.typeError(fancyInlineMethod));
+		t(unit.HelperMacros.typeError(fancyInlineMethod));
 	}
 	}
 
 
 	@:extern private inline static function fancyInlineMethod(y:Int = 3):Int {
 	@:extern private inline static function fancyInlineMethod(y:Int = 3):Int {

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

@@ -14,6 +14,6 @@ class Issue4284 extends Test {
 		eq("FOO", a!);
 		eq("FOO", a!);
 
 
 		var b = true;
 		var b = true;
-		t(unit.TestType.typeError(b!));
+		t(unit.HelperMacros.typeError(b!));
 	}
 	}
 }
 }

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

@@ -23,9 +23,9 @@ class Issue4306 extends Test {
 		function onNoMessage() { }
 		function onNoMessage() { }
 
 
 		eq("Message", addEnumListener(Message, onMessage));
 		eq("Message", addEnumListener(Message, onMessage));
-		t(unit.TestType.typeError(addEnumListener(Message, onNoMessage)));
+		t(unit.HelperMacros.typeError(addEnumListener(Message, onNoMessage)));
 		eq("NoMessage", addEnumListener(NoMessage, onNoMessage));
 		eq("NoMessage", addEnumListener(NoMessage, onNoMessage));
-		t(unit.TestType.typeError(addEnumListener(NoMessage, onMessage)));
+		t(unit.HelperMacros.typeError(addEnumListener(NoMessage, onMessage)));
 	}
 	}
 
 
 	static function getTypeName(t:TypeName) {
 	static function getTypeName(t:TypeName) {

+ 3 - 3
tests/unit/src/unit/issues/Issue4526.hx

@@ -43,14 +43,14 @@ class Issue4526 extends Test {
 
 
 		var s1:Struct1 = { x: 12, y: 13 };
 		var s1:Struct1 = { x: 12, y: 13 };
 		eq("12 13", s1.get());
 		eq("12 13", s1.get());
-		t(unit.TestType.typeError(({x:12} : Struct1)));
-		t(unit.TestType.typeError(({y:12} : Struct1)));
+		t(unit.HelperMacros.typeError(({x:12} : Struct1)));
+		t(unit.HelperMacros.typeError(({y:12} : Struct1)));
 
 
 		var s2:Struct2 = { x: 12, y: 13 };
 		var s2:Struct2 = { x: 12, y: 13 };
 		eq("12 13", s2.get());
 		eq("12 13", s2.get());
 		var s2:Struct2 = { y: 13 };
 		var s2:Struct2 = { y: 13 };
 		eq(fieldNull + " 13", s2.get());
 		eq(fieldNull + " 13", s2.get());
-		t(unit.TestType.typeError(({x:12} : Struct2)));
+		t(unit.HelperMacros.typeError(({x:12} : Struct2)));
 
 
 		var s3:Struct3 = { x: 12, y: 13 };
 		var s3:Struct3 = { x: 12, y: 13 };
 		eq("12 13", s3.get());
 		eq("12 13", s3.get());

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

@@ -6,6 +6,6 @@ private class C { }
 class Issue4666 extends Test {
 class Issue4666 extends Test {
 	public function test() {
 	public function test() {
 		var c:C;
 		var c:C;
-		unit.TestType.typedAs(c, (null:Dynamic));
+		unit.HelperMacros.typedAs(c, (null:Dynamic));
 	}
 	}
 }
 }

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

@@ -25,7 +25,7 @@ class Issue4940 extends Test {
             case KA: new A();
             case KA: new A();
             case KB: new B();
             case KB: new B();
         }
         }
-		unit.TestType.typedAs(new Base(), base);
+		unit.HelperMacros.typedAs(new Base(), base);
 	}
 	}
 
 
 	function testResolutionOrder() {
 	function testResolutionOrder() {

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

@@ -1,7 +1,7 @@
 package unit.issues;
 package unit.issues;
 
 
-import unit.TestType.typeErrorText;
-import unit.TestType.typedAs;
+import unit.HelperMacros.typeErrorText;
+import unit.HelperMacros.typedAs;
 
 
 private abstract A(String) from String {}
 private abstract A(String) from String {}
 
 

+ 2 - 2
tests/unit/src/unitstd/haxe/extern/EitherType.unit.hx

@@ -4,5 +4,5 @@ s == "string";
 e = 1;
 e = 1;
 var i:Int = e;
 var i:Int = e;
 i == 1;
 i == 1;
-TestType.typeError(e = false) == true;
-TestType.typeError(e = 1.5) == true;
+HelperMacros.typeError(e = false) == true;
+HelperMacros.typeError(e = 1.5) == true;