(#extern) without binding support
This commit is contained in:
@@ -3,6 +3,7 @@ package test.cases;
|
||||
import utest.Assert;
|
||||
import utest.Test;
|
||||
import kiss.CompilerTools;
|
||||
import kiss.Prelude;
|
||||
#if macro
|
||||
import haxe.macro.Expr;
|
||||
import haxe.macro.Context;
|
||||
@@ -15,8 +16,7 @@ class CompilerToolsTestCase extends Test {
|
||||
|
||||
static macro function _testCompileHelloWorldJs() {
|
||||
return CompilerTools.compileFileToScript(
|
||||
"kiss/template/src/template/Main.kiss", {
|
||||
lang: JavaScript,
|
||||
"kiss/template/src/template/Main.kiss", JavaScript, {
|
||||
outputFolder: "bin/helloWorldJsTest",
|
||||
});
|
||||
}
|
||||
@@ -27,8 +27,7 @@ class CompilerToolsTestCase extends Test {
|
||||
|
||||
static macro function _testCompileHelloWorldPy() {
|
||||
return CompilerTools.compileFileToScript(
|
||||
"kiss/template/src/template/Main.kiss", {
|
||||
lang: Python,
|
||||
"kiss/template/src/template/Main.kiss", Python, {
|
||||
outputFolder: "bin/helloWorldPyTest",
|
||||
});
|
||||
}
|
||||
|
17
src/test/cases/ExternTestCase.hx
Normal file
17
src/test/cases/ExternTestCase.hx
Normal file
@@ -0,0 +1,17 @@
|
||||
package test.cases;
|
||||
|
||||
import utest.Assert;
|
||||
import utest.Test;
|
||||
import kiss.CompilerTools;
|
||||
import kiss.Prelude;
|
||||
|
||||
@:build(kiss.Kiss.build())
|
||||
class ExternTestCase extends Test {
|
||||
function testExternPython() {
|
||||
_testExternPython();
|
||||
}
|
||||
|
||||
function testExternJavaScript() {
|
||||
_testExternJavaScript();
|
||||
}
|
||||
}
|
13
src/test/cases/ExternTestCase.kiss
Normal file
13
src/test/cases/ExternTestCase.kiss
Normal file
@@ -0,0 +1,13 @@
|
||||
(function _testExternPython []
|
||||
(Assert.isTrue
|
||||
(#extern Bool python []
|
||||
(#if python
|
||||
true
|
||||
false))))
|
||||
|
||||
(function _testExternJavaScript []
|
||||
(Assert.isTrue
|
||||
(#extern Bool js []
|
||||
(#if js
|
||||
true
|
||||
false))))
|
Reference in New Issue
Block a user