Browse Source

[tests] add commented out test

see #8616
Simon Krajewski 6 years ago
parent
commit
10cf34fbe5

+ 13 - 0
tests/server/src/Main.hx

@@ -1,3 +1,5 @@
+import haxe.io.Path;
+import sys.io.File;
 import haxe.display.Display;
 import haxe.display.Display;
 import haxe.display.FsPath;
 import haxe.display.FsPath;
 import haxe.display.Server;
 import haxe.display.Server;
@@ -258,6 +260,17 @@ class ServerTests extends HaxeServerTestCase {
 		var r = ~/skipping Dependency\(.*dep.dep\)/;
 		var r = ~/skipping Dependency\(.*dep.dep\)/;
 		Assert.isTrue(messages.exists(message -> r.match(message)));
 		Assert.isTrue(messages.exists(message -> r.match(message)));
 	}
 	}
+
+	// function testIssue8616() {
+	// 	vfs.putContent("Main.hx", getTemplate("issues/Issue8616/Main.hx"));
+	// 	vfs.putContent("A.hx", getTemplate("issues/Issue8616/A.hx"));
+	// 	var args = ["-main", "Main", "-js", "out.js"];
+	// 	runHaxe(args);
+	// 	runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("Main.hx")});
+	// 	runHaxe(args);
+	// 	var content = File.getContent(Path.join([testDir, "out.js"]));
+	// 	Assert.isTrue(content.indexOf("this1.use(v1)") != -1);
+	// }
 }
 }
 
 
 class Main {
 class Main {

+ 13 - 0
tests/server/test/templates/issues/Issue8616/A.hx

@@ -0,0 +1,13 @@
+abstract A(C) {
+	public inline function f(v:Int)
+		this.f(v);
+}
+
+class C {
+	public inline function f(v:Int) {
+		use(v);
+		use(v);
+	}
+
+	function use(v:Int) {}
+}

+ 9 - 0
tests/server/test/templates/issues/Issue8616/Main.hx

@@ -0,0 +1,9 @@
+class Main {
+	static var a:A;
+	static var v:Int;
+
+	static function main() {
+		a.f(v);
+		a.f(v);
+	}
+}