From 1fed0433e57055f6ad233de28a5ee0c35eba8a5a Mon Sep 17 00:00:00 2001 From: Mike Cifelli Date: Sat, 25 Feb 2017 19:12:34 -0500 Subject: [PATCH] Formatted a source file --- test/function/builtin/special/DEFINE_MACROTester.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/function/builtin/special/DEFINE_MACROTester.java b/test/function/builtin/special/DEFINE_MACROTester.java index ca6ef23..ef369cc 100644 --- a/test/function/builtin/special/DEFINE_MACROTester.java +++ b/test/function/builtin/special/DEFINE_MACROTester.java @@ -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)";