package function.builtin; import static testutil.TestUtilities.*; import org.junit.Test; import function.ArgumentValidator.*; public class NULLTester { @Test public void testNilIsNull() { String input = "(null ())"; assertSExpressionsMatch(evaluateString(input), parseString("T")); } @Test public void testListIsNotNull() { String input = "(null '(1))"; assertSExpressionsMatch(evaluateString(input), parseString("NIL")); } @Test(expected = TooFewArgumentsException.class) public void testNullWithTooFewArguments() { evaluateString("(null)"); } @Test(expected = TooManyArgumentsException.class) public void testNullWithTooManyArguments() { evaluateString("(null 1 2)"); } }