conditional compilation \#case

This commit is contained in:
2021-07-12 15:22:03 -06:00
parent c9142afe22
commit 1d863d3ec9
5 changed files with 70 additions and 7 deletions

View File

@@ -47,4 +47,8 @@ class ConditionalCompilationTestCase extends Test {
Assert.equals("Python", targetLanguage);
#end
}
function testCase() {
_testCase();
}
}

View File

@@ -21,4 +21,12 @@
(interp "Haxe")
(hxnodejs "NodeJS")
(js "JavaScript")
(py "Python")))
(py "Python")))
(defun _testCase []
(#case var1ForCase
("var1" (Assert.pass))
(otherwise (Assert.fail)))
(#case var2ForCase
("var2" (Assert.pass))
(otherwise (Assert.fail))))