|
@@ -1,13 +1,11 @@
|
|
package cases;
|
|
package cases;
|
|
|
|
|
|
-#if !enabled
|
|
|
|
-class CsSafeTypeBuilding extends TestCase {
|
|
|
|
-}
|
|
|
|
-#else
|
|
|
|
import haxe.display.Display;
|
|
import haxe.display.Display;
|
|
import haxe.display.FsPath;
|
|
import haxe.display.FsPath;
|
|
|
|
+import haxe.display.Protocol;
|
|
import haxe.display.Server;
|
|
import haxe.display.Server;
|
|
import utest.Assert;
|
|
import utest.Assert;
|
|
|
|
+import utils.Vfs;
|
|
|
|
|
|
using StringTools;
|
|
using StringTools;
|
|
using Lambda;
|
|
using Lambda;
|
|
@@ -16,7 +14,8 @@ class CsSafeTypeBuilding extends TestCase {
|
|
var originalContent:String;
|
|
var originalContent:String;
|
|
|
|
|
|
override public function setup(async:utest.Async) {
|
|
override public function setup(async:utest.Async) {
|
|
- super.setup(async);
|
|
|
|
|
|
+ testDir = "test/cases/" + @:privateAccess TestCase.i++;
|
|
|
|
+ vfs = new Vfs(testDir);
|
|
|
|
|
|
originalContent = "";
|
|
originalContent = "";
|
|
vfs.putContent("Bar.hx", getTemplate("csSafeTypeBuilding/Bar.hx"));
|
|
vfs.putContent("Bar.hx", getTemplate("csSafeTypeBuilding/Bar.hx"));
|
|
@@ -24,6 +23,10 @@ class CsSafeTypeBuilding extends TestCase {
|
|
vfs.putContent("Foo.hx", getTemplate("csSafeTypeBuilding/Foo.hx"));
|
|
vfs.putContent("Foo.hx", getTemplate("csSafeTypeBuilding/Foo.hx"));
|
|
vfs.putContent("Macro.macro.hx", getTemplate("csSafeTypeBuilding/Macro.macro.hx"));
|
|
vfs.putContent("Macro.macro.hx", getTemplate("csSafeTypeBuilding/Macro.macro.hx"));
|
|
vfs.putContent("Main.hx", getTemplate("csSafeTypeBuilding/Main.hx"));
|
|
vfs.putContent("Main.hx", getTemplate("csSafeTypeBuilding/Main.hx"));
|
|
|
|
+
|
|
|
|
+ runHaxeJson(["--cwd", TestCase.rootCwd, "--cwd", testDir], Methods.ResetCache, {}, () -> {
|
|
|
|
+ async.done();
|
|
|
|
+ });
|
|
}
|
|
}
|
|
|
|
|
|
#if debug
|
|
#if debug
|
|
@@ -124,36 +127,35 @@ class CsSafeTypeBuilding extends TestCase {
|
|
runHaxe(args);
|
|
runHaxe(args);
|
|
assertResult(target);
|
|
assertResult(target);
|
|
|
|
|
|
- runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("Baz.hx")});
|
|
|
|
|
|
+ runHaxeJson(args, ServerMethods.Invalidate, {file: new FsPath("Baz.hx")});
|
|
runHaxe(args);
|
|
runHaxe(args);
|
|
assertBuilt(["Baz"]);
|
|
assertBuilt(["Baz"]);
|
|
assertResult(target);
|
|
assertResult(target);
|
|
|
|
|
|
- runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("Main.hx")});
|
|
|
|
|
|
+ runHaxeJson(args, ServerMethods.Invalidate, {file: new FsPath("Main.hx")});
|
|
runHaxe(args);
|
|
runHaxe(args);
|
|
assertBuilt(["Main"]);
|
|
assertBuilt(["Main"]);
|
|
assertResult(target);
|
|
assertResult(target);
|
|
|
|
|
|
- runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("Bar.hx")});
|
|
|
|
- runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("Main.hx")});
|
|
|
|
|
|
+ runHaxeJson(args, ServerMethods.Invalidate, {file: new FsPath("Bar.hx")});
|
|
|
|
+ runHaxeJson(args, ServerMethods.Invalidate, {file: new FsPath("Main.hx")});
|
|
runHaxe(args);
|
|
runHaxe(args);
|
|
assertBuilt(["Main", "Bar"]);
|
|
assertBuilt(["Main", "Bar"]);
|
|
assertResult(target);
|
|
assertResult(target);
|
|
|
|
|
|
- runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("Bar.hx")});
|
|
|
|
|
|
+ runHaxeJson(args, ServerMethods.Invalidate, {file: new FsPath("Bar.hx")});
|
|
runHaxe(args);
|
|
runHaxe(args);
|
|
assertBuilt(["Main", "Bar", "Baz"]);
|
|
assertBuilt(["Main", "Bar", "Baz"]);
|
|
assertResult(target);
|
|
assertResult(target);
|
|
|
|
|
|
- runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("Foo.hx")});
|
|
|
|
|
|
+ runHaxeJson(args, ServerMethods.Invalidate, {file: new FsPath("Foo.hx")});
|
|
runHaxe(args);
|
|
runHaxe(args);
|
|
assertBuilt(["Main", "Bar", "Baz"]);
|
|
assertBuilt(["Main", "Bar", "Baz"]);
|
|
assertResult(target);
|
|
assertResult(target);
|
|
|
|
|
|
- runHaxeJson([], ServerMethods.Invalidate, {file: new FsPath("Macro.macro.hx")});
|
|
|
|
|
|
+ runHaxeJson(args, ServerMethods.Invalidate, {file: new FsPath("Macro.macro.hx")});
|
|
runHaxe(args);
|
|
runHaxe(args);
|
|
assertBuilt(["Main", "Bar", "Baz"], true);
|
|
assertBuilt(["Main", "Bar", "Baz"], true);
|
|
assertResult(target);
|
|
assertResult(target);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-#end
|
|
|