Sfoglia il codice sorgente

enable all passing tests for HL

Nicolas Cannasse 7 anni fa
parent
commit
4d79f7626c

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

@@ -185,7 +185,7 @@ class Test {
 	}
 
    static function logVerbose(msg:String) {
-	  #if (cpp || neko || php)
+	  #if (cpp || neko || php || hl)
 	  Sys.println(msg);
 	  #end
    }

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

@@ -38,7 +38,7 @@ class TestArrowFunctions extends Test {
 
 		// skipping hl for now due to variance errors:
 		// Don't know how to cast ref(i32) to null(i32) see issue #6210
-		#if !(hl || as3)
+		#if !as3
 
 		maybe = () -> Math.random() > 0.5;
 
@@ -92,7 +92,7 @@ class TestArrowFunctions extends Test {
 		f3_1 = (?a:Int, b:String) -> a + b.length;
 		f3_2 = (a:Int, ?b:Int) -> a + b;
 
-		#if !flash
+		#if !(flash || hl) // Cannot skip not nullable argument
 		f3_1 = function (a=1, b:String) return a + b.length;
 		eq(f3_1("--"),3);
 

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

@@ -260,9 +260,8 @@ class TestType extends Test {
 		var f : Void -> String = foo.bind(0);
  		eq("foo0", f());
 
-		// TODO: this fails on flash 9
 		var foo = function(bar = 2) { return bar; };
-		#if (flash || hl)
+		#if (flash || hl) // Cannot skip not-nullable argument
 		t(typeError(foo.bind(_)));
 		#else
 		var l = foo.bind(_);

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

@@ -2,7 +2,7 @@ package unit.issues;
 
 class Issue2861 extends Test
 {
-#if (flash || neko || cpp || java || php)
+#if (flash || neko || cpp || java || php || hl)
 	public function test()
 	{
 		var b = haxe.io.Bytes.alloc(2048);

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

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

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

@@ -6,9 +6,9 @@ class Issue5572 extends unit.Test {
 	static var field2 = "user_3235_65290";
 
 	function test() {
-		#if !(neko || hl)
+		#if !neko
 		var o = {};
-		Reflect.setField(o, field1, 1); // first, goes into hashes array 
+		Reflect.setField(o, field1, 1); // first, goes into hashes array
 		Reflect.setField(o, field2, 2); // second, added to object's "conflicts"
 		Reflect.setField(o, field2, 3); // should find one from "conflicts" and change the value
 		eq(Reflect.field(o, field1), 1); // retrieved from the hashes array

+ 0 - 2
tests/unit/src/unitstd/EReg.unit.hx

@@ -109,6 +109,4 @@ pos.len == 2;
 ~/(Hola)/.map("Hello World", function(e) return throw "not called") == "Hello World";
 
 // escape
-#if !hl
 new EReg("^" + EReg.escape("\\ ^ $ * + ? . ( ) | { } [ ]") + "$", "").match("\\ ^ $ * + ? . ( ) | { } [ ]") == true;
-#end

+ 1 - 1
tests/unit/src/unitstd/Https.unit.hx

@@ -1,4 +1,4 @@
-#if (cpp || (neko && !macro && !interp))
+#if (cpp || hl || (neko && !macro && !interp))
 var r = haxe.Http.requestUrl("https://raw.githubusercontent.com/HaxeFoundation/haxe/development/tests/unit/res1.txt");
 r == "Héllo World !";
 #end

+ 0 - 2
tests/unit/src/unitstd/Type.unit.hx

@@ -58,11 +58,9 @@ Type.createInstance(C, []).v == "var";
 var c = Type.createInstance(ClassWithCtorDefaultValues, [2, "bar"]);
 c.a == 2;
 c.b == "bar";
-#if !hl
 var c2 = Type.createInstance(ClassWithCtorDefaultValues2, [2, "bar"]);
 c2.a == 2;
 c2.b == "bar";
-#end
 //var t = Type.createInstance(ClassWithCtorDefaultValuesChild, [2, "bar"]);
 //t.a == 2;
 //t.b == "bar";

+ 1 - 1
tests/unit/src/unitstd/haxe/zip/Compress.unit.hx

@@ -1,5 +1,5 @@
 // not supported in js/python/cs yet
-#if (cpp || php || java || neko || flash)
+#if (cpp || php || java || neko || flash || hl)
 var b = haxe.io.Bytes.ofString("test");
 var c = haxe.zip.Compress.run(b, 9);