transcendental-lisp/test/function/builtin/predicate/NULLTester.java

33 lines
707 B
Java
Raw Normal View History

package function.builtin.predicate;
2017-01-27 11:37:11 -05:00
import static testutil.TestUtilities.evaluateString;
import static testutil.TypeAssertions.*;
import org.junit.Test;
import function.ArgumentValidator.*;
public class NULLTester {
@Test
2017-01-27 11:37:11 -05:00
public void nilIsNull() {
assertT(evaluateString("(null ())"));
}
@Test
2017-01-27 11:37:11 -05:00
public void listIsNotNull() {
assertNil(evaluateString("(null '(1))"));
}
@Test(expected = TooFewArgumentsException.class)
public void testNullWithTooFewArguments() {
evaluateString("(null)");
}
@Test(expected = TooManyArgumentsException.class)
public void testNullWithTooManyArguments() {
evaluateString("(null 1 2)");
}
}