From 1829fea754cdb9b42282bb6aaa0f8a31887199be Mon Sep 17 00:00:00 2001 From: Mike Cifelli Date: Thu, 15 Mar 2018 18:48:33 -0400 Subject: [PATCH] Increase test coverage --- test/function/builtin/special/LAMBDATest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/function/builtin/special/LAMBDATest.java b/test/function/builtin/special/LAMBDATest.java index 81a6bf7..d7b4883 100644 --- a/test/function/builtin/special/LAMBDATest.java +++ b/test/function/builtin/special/LAMBDATest.java @@ -15,6 +15,7 @@ import function.ArgumentValidator.BadArgumentTypeException; import function.ArgumentValidator.DottedArgumentListException; import function.ArgumentValidator.TooFewArgumentsException; import function.ArgumentValidator.TooManyArgumentsException; +import function.builtin.EVAL.UndefinedFunctionException; import sexpression.Cons; import sexpression.LispNumber; import sexpression.Symbol; @@ -132,6 +133,11 @@ public class LAMBDATest extends SymbolAndFunctionCleaner { evaluateString("((lambda (x y) x) 1 2 3)"); } + @Test(expected = UndefinedFunctionException.class) + public void badAnonymousFunctionCall() { + evaluateString("((bad-lambda (x y) x) 1 2 3)"); + } + @Test public void lexicalClosure() { evaluateString("(setq increment-count (let ((counter 0)) (lambda () (setq counter (+ 1 counter)))))");