Decomissioning macro functions
This commit is contained in:
@@ -112,15 +112,6 @@ class BasicTestCase extends Test {
|
||||
_testIf();
|
||||
}
|
||||
|
||||
function testMacros() {
|
||||
Assert.equals(7, BasicTestCase.incrementTwice(5));
|
||||
|
||||
var seasonsGreetings = "ho ";
|
||||
Assert.equals("ho ho ho ", BasicTestCase.doTwiceString(() -> {
|
||||
seasonsGreetings += "ho ";
|
||||
}));
|
||||
}
|
||||
|
||||
// TODO to really test typed variable definitions, check for compilation failure on a bad example
|
||||
function testTypedDefvar() {
|
||||
Assert.equals(8, BasicTestCase.myInt);
|
||||
|
@@ -92,18 +92,6 @@
|
||||
|
||||
(defvar :Int myInt 8)
|
||||
|
||||
(defmacrofun doTwiceInt [intOp]
|
||||
,intOp
|
||||
,intOp)
|
||||
|
||||
// I think this causes doTwiceInt's runtime function to be typed as requiring Quote<Int> and returning Int
|
||||
(defun :Int incrementTwice [:Int val]
|
||||
(doTwiceInt ++val))
|
||||
|
||||
(defmacrofun doTwiceString [stringOp]
|
||||
,stringOp
|
||||
,stringOp)
|
||||
|
||||
(defun myTryCatch [:Any e]
|
||||
(try
|
||||
(throw e)
|
||||
|
Reference in New Issue
Block a user