highly experimental quote and eval
This commit is contained in:
@@ -322,6 +322,11 @@ class BasicTestCase extends Test {
|
||||
function testExpComment() {
|
||||
_testExpComment();
|
||||
}
|
||||
|
||||
function testEval() {
|
||||
_testEvalStatic();
|
||||
_testEval();
|
||||
}
|
||||
}
|
||||
|
||||
class BasicObject {
|
||||
|
@@ -578,4 +578,15 @@
|
||||
(Assert.equals 2 (arrowSyntax))))
|
||||
|
||||
(function _testExpComment []
|
||||
(Assert.equals 15 (+ **6 5 **(- 5 11) 5 (+ 5 **(20 9)))))
|
||||
(Assert.equals 15 (+ **6 5 **(- 5 11) 5 (+ 5 **(20 9)))))
|
||||
|
||||
(var staticValue 9)
|
||||
(prop value 2)
|
||||
(method _testEval []
|
||||
(Assert.equals 9 (eval 'staticValue))
|
||||
(Assert.equals 2 (eval 'value))
|
||||
(Assert.equals 11 (eval '(+ staticValue value))))
|
||||
|
||||
(function _testEvalStatic []
|
||||
(Assert.equals 9 (eval 'staticValue))
|
||||
(assertThrows (eval 'value)))
|
Reference in New Issue
Block a user