// $Id: InterpreterTest.scala,v 1.1 2005/10/28 20:46:16 leavens Exp leavens $
package interp;

import testing._;

/** Testing for the interpreter.
 * @author Gary T. Leavens
 */
object InterpreterTest with ConsoleTestRunner {

  /** The actual tests to run. */    
  val suite = new TestSuite(
    // test without parsing
    new UExpTest("LitExp(342)", 
      LitExp(342), 342),
    new UExpTest("VarExp('i)", 
      VarExp('i), 1),
    new UExpTest("PrimAppExp(AddPrim(), List(VarExp('v), VarExp('x)))", 
      PrimAppExp(AddPrim(), List(VarExp('v), VarExp('x))), 15),
  
    // test with parsing
    new ExpTest("342", 342),
    new ExpTest("i", 1),
    new ExpTest("+(v, x)", 15),
    new ExpTest("-(x, i)", 9),
    new ExpTest("*(add1(v), +(x, sub1(i)))", 60),
    new Expect("Done!", 1, 1)
    );
}
