package function.builtin.predicate; import static testutil.TestUtilities.evaluateString; import static testutil.TypeAssertions.*; import org.junit.Test; import function.ArgumentValidator.*; public class LISTPTester { @Test public void testListpWithList_ReturnsT() { assertT(evaluateString("(listp '(1))")); } @Test public void testListWithNonList_ReturnsNil() { assertNil(evaluateString("(listp 1)")); } @Test(expected = TooFewArgumentsException.class) public void testListpWithTooFewArguments() { evaluateString("(listp)"); } @Test(expected = TooManyArgumentsException.class) public void testListpWithTooManyArguments() { evaluateString("(listp '() '())"); } }