public void TestError()
 {
     ControlStack stack = new ControlStack();
     Assert.Throws<InvalidOperationException>(() => stack.Pop());
     stack.Push(false);
     stack.Pop();
     Assert.Throws<InvalidOperationException>(() => stack.Pop());
 }
        public void TestClear()
        {
            ControlStack stack = new ControlStack();
            stack.Push(false);
            stack.Push(true);

            stack.Clear();
            Assert.True(stack.IsEmpty);
            Assert.True(stack.ExecuteBranch);
        }