}
@Test
public void maxArgsSimple() throws Exception {
Stm prog = new CompoundStm(new AssignStm("a", new OpExp(new NumExp(5),
OpExp.Op.PLUS, new NumExp(3))), new CompoundStm(new AssignStm(
"b", new EseqExp(new PrintStm(new PairExpList(new IdExp("a"),
new LastExpList(new OpExp(new IdExp("a"),
OpExp.Op.MINUS, new NumExp(1))))), new OpExp(
new NumExp(10), OpExp.Op.TIMES, new IdExp("a")))),
new PrintStm(new LastExpList(new IdExp("b")))));
assertEquals(2, prog.maxArgs());
prog = new CompoundStm(new AssignStm("a", new OpExp(new NumExp(5),
OpExp.Op.PLUS, new NumExp(3))), new CompoundStm(new AssignStm(
"b", new NumExp(2)), new PrintStm(new LastExpList(
new IdExp("b")))));
assertEquals(1, prog.maxArgs());