Failing test case for compileToScript()

This commit is contained in:
2021-07-25 21:51:31 -06:00
parent 7a50cdea65
commit a6bbe62442
3 changed files with 79 additions and 2 deletions

View File

@@ -0,0 +1,28 @@
package test.cases;
import utest.Assert;
import utest.Test;
import kiss.CompilerTools;
#if macro
import haxe.macro.Expr;
import haxe.macro.Context;
#end
class CompilerToolsTestCase extends Test {
function testCompileHelloWorld() {
Assert.equals("Hello, world!", _testCompileHelloWorld());
}
static macro function _testCompileHelloWorld() {
var runHelloWorld = CompilerTools.compileFileToScript(
"kiss/template/src/template/Main.kiss", {
lang: JavaScript,
outputFolder: "bin/js",
});
return {
pos: Context.currentPos(),
expr: EConst(CString(runHelloWorld(), DoubleQuotes))
};
}
}