package function.builtin.predicate; import static testutil.TestUtilities.evaluateString; import static testutil.TypeAssertions.*; import org.junit.Test; import function.ArgumentValidator.*; public class ATOMTest { @Test public void atomIsAtom() { assertT(evaluateString("(atom 'a)")); } @Test public void atomIsAtomWithAlias() { assertT(evaluateString("(atom? 'a)")); } @Test public void listIsNotAtom() { assertNil(evaluateString("(atom '(1 2 3))")); } @Test(expected = TooManyArgumentsException.class) public void testApplyWithTooManyArguments() { evaluateString("(atom '1 '2)"); } @Test(expected = TooFewArgumentsException.class) public void testApplyWithTooFewArguments() { evaluateString("(atom)"); } }