test inline (load)
This commit is contained in:
@@ -278,6 +278,10 @@ class BasicTestCase extends Test {
|
||||
Assert.equals("loaded", BasicTestCase.loadedFunction());
|
||||
}
|
||||
|
||||
function testLoadInline() {
|
||||
_testLoadInline();
|
||||
}
|
||||
|
||||
function testAssignArith() {
|
||||
_testAssignArith();
|
||||
}
|
||||
|
@@ -1,6 +1,11 @@
|
||||
// (load) brings in the fields and compile-time definitions of another Kiss file
|
||||
(load "BasicTestCaseExtra.kiss")
|
||||
|
||||
(function _testLoadInline []
|
||||
(let [&mut thatValue 5]
|
||||
(load "BasicTestCaseExtra2.kiss")
|
||||
(Assert.equals 50 thatValue)))
|
||||
|
||||
// (var) declares static variables
|
||||
(var message "Howdy")
|
||||
|
||||
|
2
src/test/cases/BasicTestCaseExtra2.kiss
Normal file
2
src/test/cases/BasicTestCaseExtra2.kiss
Normal file
@@ -0,0 +1,2 @@
|
||||
// Using inline (load) for something like this would actually be terrible:
|
||||
(set thatValue 50)
|
Reference in New Issue
Block a user