Formatted a source file
This commit is contained in:
parent
78c7bf4d9c
commit
1fed0433e5
|
@ -62,13 +62,13 @@ public class DEFINE_MACROTester {
|
|||
evaluateString("(define-macro f (x) (car x))");
|
||||
assertSExpressionsMatch(parseString("quote"), evaluateString("(f '(1 2 3))"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefineMacroAdd() {
|
||||
evaluateString("(define-macro f (x) (+ (eval x) 23))");
|
||||
assertSExpressionsMatch(parseString("27"), evaluateString("(f (+ 2 2))"));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testDefineMacroSetVariable() {
|
||||
evaluateString("(define-macro f (x) (set x 23))");
|
||||
|
@ -83,6 +83,7 @@ public class DEFINE_MACROTester {
|
|||
evaluateString("(f x)");
|
||||
assertSExpressionsMatch(parseString("0"), evaluateString("x"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDefineMacroAvoidVariableCaptureConvention() {
|
||||
evaluateString("(setf x 0)");
|
||||
|
@ -90,6 +91,7 @@ public class DEFINE_MACROTester {
|
|||
evaluateString("(f x)");
|
||||
assertSExpressionsMatch(parseString("23"), evaluateString("x"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void redefineMacro_DisplaysWarning() {
|
||||
String input = "(define-macro myFunction () nil)";
|
||||
|
|
Loading…
Reference in New Issue