Beispiel #1
0
        public void Can_evaluate_continue_and_evaluate_again()
        {
            var testDebugger = new TestDebuggerFacade();

            testDebugger.Load(@"
sub sub1()
    var x = 33
    x = x + 1
    x = x + 1
end sub");

            testDebugger.AddBreakpoint(4);
            testDebugger.AddBreakpoint(5);
            testDebugger.CallSubrutineAsync("sub1");
            testDebugger.WaitForBreakpointHit();

            var result = testDebugger.EvaluateExpression("x");

            result.Result.Value.Should().Be(33);

            testDebugger.Continue();
            testDebugger.WaitForBreakpointHit();

            result = testDebugger.EvaluateExpression("x");
            result.Result.Value.Should().Be(34);

            testDebugger.Continue();

            testDebugger.AssertSubrutineFinished();
        }
Beispiel #2
0
        public void Can_evaluate()
        {
            var testDebugger = new TestDebuggerFacade();

            testDebugger.Load(@"
sub sub1()
    var x = 33
    x = x + 1
end sub");

            testDebugger.AddBreakpoint(4);
            testDebugger.CallSubrutineAsync("sub1");
            testDebugger.WaitForBreakHit();

            var result = testDebugger.EvaluateExpression("x");

            result.Result.Value.Should().Be(33);
        }