private void AssertPoint(SnapshotOverlapPoint point, char c) { Assert.Equal(0, point.SpacesAfter); Assert.Equal(0, point.SpacesBefore); Assert.Equal(1, point.Width); Assert.Equal(c, point.Point.GetChar()); }
public void TabStart() { Create("\t"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0), before: 0, width: 4); Assert.Equal(0, point.SpacesBefore); Assert.Equal(3, point.SpacesAfter); }
public void SimpleNonColumnZero() { Create("cat"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(1), beforeSpaces: 0, totalSpaces: 1); Assert.Equal(0, point.SpacesBefore); Assert.Equal(0, point.SpacesAfter); }
public void Simple() { Create("cat"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0), before: 0, width: 1); Assert.Equal(0, point.SpacesBefore); Assert.Equal(0, point.SpacesAfter); }
public void TabEnd() { Create("\t"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 3, totalSpaces: 4); Assert.Equal(3, point.SpacesBefore); Assert.Equal(0, point.SpacesAfter); }
public void Tab() { Create("\tcat"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0)); AssertPoint(point, '\t'); }
public void Normal() { Create("\tcat"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(1)); AssertPoint(point, 'c'); }
public void Wide() { Create("\tあcat"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(1)); AssertPoint(point, 'あ'); }
public void TabMiddle() { Create("\t"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 1, totalSpaces: 4); Assert.Equal(1, point.SpacesBefore); Assert.Equal(2, point.SpacesAfter); Assert.Equal(4, point.Spaces); }
public void Simple() { Create("cat"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 0, totalSpaces: 1); Assert.Equal(0, point.SpacesBefore); Assert.Equal(0, point.SpacesAfter); }
public void EndOfBuffer() { Create("cat"); var point = new SnapshotOverlapPoint(_textBuffer.GetEndPoint(), 0, 0); Assert.Equal(0, point.Spaces); Assert.Equal(0, point.SpacesBefore); Assert.Equal(0, point.SpacesAfter); }
public void TabStart() { Create("\t"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 0, totalSpaces: 4); Assert.Equal(0, point.SpacesBefore); Assert.Equal(3, point.SpacesAfter); }
public void SimpleNonColumnZero() { Create("cat"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(1), before: 0, width: 1); Assert.Equal(0, point.SpacesBefore); Assert.Equal(0, point.SpacesAfter); }
public void TabEnd() { Create("\t"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0), before: 3, width: 4); Assert.Equal(3, point.SpacesBefore); Assert.Equal(0, point.SpacesAfter); }
public void EndOfBuffer() { Create("cat"); var point = new SnapshotOverlapPoint(_textBuffer.GetEndPoint(), 0, 0); Assert.Equal(0, point.Width); Assert.Equal(0, point.SpacesBefore); Assert.Equal(0, point.SpacesAfter); }
public void TabMiddle() { Create("\t"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0), before: 1, width: 4); Assert.Equal(1, point.SpacesBefore); Assert.Equal(2, point.SpacesAfter); Assert.Equal(4, point.Width); }
private void AssertPoint(SnapshotOverlapPoint point, char c) { Assert.Equal(0, point.SpacesAfter); Assert.Equal(0, point.SpacesBefore); Assert.Equal(1, point.Spaces); Assert.Equal(c, point.Point.GetChar()); }
public void Wide() { Create("\t\u3042cat"); var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(1)); AssertPoint(point, '\u3042'); }