@Test
public void testArrayInc() throws Exception {
CompilationUnit cu = EclipseTACSimpleTestDriver.parseCode("ArrayInc", ARRAY_INC);
MethodDeclaration m = EclipseTACSimpleTestDriver.getFirstMethod(cu);
EclipseTAC tac = new EclipseTAC(m.resolveBinding());
PrefixExpression inc = (PrefixExpression) EclipseTACSimpleTestDriver.getLastStatementReturn(m).getExpression();
TACInstruction instr = tac.instruction(inc);
Assert.assertTrue(instr != null);
Assert.assertTrue(instr instanceof EclipseInstructionSequence);
LoadArrayInstruction load = (LoadArrayInstruction) tac.instruction(inc.getOperand());
EclipseInstructionSequence seq = (EclipseInstructionSequence) instr;
Assert.assertEquals(
"Wrong number of instructions in sequence: " + seq.getInstructions().length,
3, seq.getInstructions().length);