package function.builtin.special; import static testutil.TestUtilities.*; import org.junit.Test; import function.ArgumentValidator.*; import testutil.SymbolAndFunctionCleaner; public class QUOTETest extends SymbolAndFunctionCleaner { @Test public void quoteSymbol() { String input = "'a"; assertSExpressionsMatch(parseString("a"), evaluateString(input)); } @Test public void quoteList() { String input = "'(l i s t)"; assertSExpressionsMatch(parseString("(l i s t)"), evaluateString(input)); } @Test(expected = TooFewArgumentsException.class) public void quoteWithTooFewArguments() { evaluateString("(quote)"); } @Test(expected = TooManyArgumentsException.class) public void quoteWithTooManyArguments() { evaluateString("(quote a b)"); } }