public void SetInnerScope_IsFlat_CreatesTwoExtraScopesIfScopeIsInTheMiddle2() { scope = new Scope("abcd"); Scope inner = scope.DefineInnerScope(1, 2); Scope[] innerScopes = scope.GetInnerScopes(); Assert.AreEqual(3, innerScopes.Length); }
public void SetInnerScope_IsFlat_CreatesOneExtraScopesIfScopeIsInTheEnd() { scope = new Scope("abc"); Scope inner = scope.DefineInnerScope(2, 1); Scope[] innerScopes = scope.GetInnerScopes(); Assert.AreEqual(2, innerScopes.Length); }
public void GetInnetScopes_Returns0ByDefault() { Scope s = new Scope("1"); Assert.AreEqual(0, s.GetInnerScopes().Length); }
public void RemoveInnerScope_leftIsTheOnlyExplicit_AllScopesAreRemoved() { scope = new Scope("abc"); Scope inner = scope.DefineInnerScope(0, 1); scope.RemoveInnerScope(scope.InnerLeftScope); Assert.AreEqual(0,scope.GetInnerScopes().Length); }
private void DrawScope(Scope scopeToDraw) { if (!CanDrawScopes || scopeToDraw == null) return; VisualScopeMarker visualScopeMarker = GetVisualScopeMarker(scopeToDraw); if (visualScopeMarker!=null) { visualScopeMarker.Redraw(currentGraphics); } // makeDebuggerMarker(scopeToDraw).DrawCustomForSingleSurroundingRect(Rectangle.Empty, scopeToDraw); foreach (Scope innerScope in scopeToDraw.GetInnerScopes()) { if (innerScope == null) { continue; } if (!innerScope.IsFlat) { DrawScope(innerScope); } VisualScopeMarker innerVisual = GetVisualScopeMarker(innerScope); if(innerVisual!=null) { innerVisual.Redraw(currentGraphics); } } }