public class ControlFlowGraphTest extends CompilerTestCase {
@Test
public void singleBlock() {
IRBody block = buildScope("y<-x+1;z<-3; 4");
ControlFlowGraph cfg = new ControlFlowGraph(block);
System.out.println(cfg);
List<BasicBlock> basicBlocks = cfg.getBasicBlocks();
assertThat(basicBlocks.size(), equalTo(3)); // 1 + exit + entry = 3
assertThat(basicBlocks.get(0).getStatements().size(), equalTo(block.getStatements().size()));
}