public void CreateSuccessorBlock_cannot_be_called_twice()
        {
            var blockBuilder = new BasicBlockGraphBuilder().GetInitialBlockBuilder();

            Assert.That(() => blockBuilder.CreateSuccessorBlock(), Throws.Nothing);
            Assert.That(() => blockBuilder.CreateSuccessorBlock(), Throws.InvalidOperationException);
        }
        public void CreateSuccessorBlock_does_not_set_successor_if_return_exists()
        {
            var blockBuilder = new BasicBlockGraphBuilder().GetInitialBlockBuilder();

            blockBuilder.AppendInstruction(Opcode.Return, 0, 0, 0);

            Assert.That(blockBuilder.CreateSuccessorBlock(), Is.Not.Null);
            Assert.That(blockBuilder.DefaultSuccessor, Is.EqualTo(-1));
        }