2
0
Эх сурвалжийг харах

[tests] don't assume test methods with optional args will work when called throught Reflect.callMethod with no arguments - we don't specify that.

Dan Korostelev 8 жил өмнө
parent
commit
f9230fc143

+ 5 - 1
tests/unit/src/unit/issues/Issue2607.hx

@@ -4,8 +4,12 @@ class Issue2607 extends unit.Test {
 
 	inline static var CONST:Float = -1;
 
-	function test(v = CONST) {
+	function fun(v = CONST) {
 		eq(v, -1);
 		t((v is Float));
 	}
+
+	function test() {
+		fun();
+	}
 }

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

@@ -2,10 +2,10 @@ package unit.issues;
 
 class Issue3577 extends Test {
 	function test() {
-		eq(testNull(2), 4);
+		eq(tNull(2), 4);
 	}
 
-	function testNull(?x:Int=0) : Int {
+	function tNull(?x:Int=0) : Int {
 		var y:Int = x;
 		function anon() {
 			y *= 2;