Bläddra i källkod

[tests] enable hlc test for Issue10109 (#12153)

* [tests] enable hlc test for Issue10109, TestExceptions

* [tests] disable hlc test testException again (win gcc fail)
Yuxiao Mao 3 månader sedan
förälder
incheckning
1b34f3a25a

+ 1 - 2
std/hl/_std/haxe/NativeStackTrace.hx

@@ -29,8 +29,7 @@ class NativeStackTrace {
 		var count = callStackRaw(null);
 		var arr = new NativeArray(count);
 		callStackRaw(arr);
-		// This will avoid errors when compiling hl/c on unix
-		// See https://github.com/HaxeFoundation/haxe/pull/11382 for long term fix
+		// This will avoid hl/c errors on platforms without callstack support
 		if (arr.length == 0) return arr;
 		return arr.sub(1, arr.length - 1);
 	}

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

@@ -251,8 +251,7 @@ class TestExceptions extends Test {
 			var expected = null;
 			var lineShift = 0;
 			for(s in stacks) {
-				// This will avoid errors when compiling hl/c on unix
-				// See https://github.com/HaxeFoundation/haxe/pull/11382 for long term fix
+				// This will avoid hl/c errors on platforms without callstack support
 				#if hlc if (s.length == 0) continue; #end
 
 				if(expected == null) {

+ 1 - 2
tests/unit/src/unit/issues/Issue10109.hx

@@ -1,8 +1,7 @@
 package unit.issues;
 
 class Issue10109 extends Test {
-// Disabled for hl/c until https://github.com/HaxeFoundation/haxe/pull/11382 is implemented
-#if (hl && !hlc)
+#if hl
 	@:pure(false)
 	static function foo( o : String ) {
 		return o.length;