示例#1
0
 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());
 }
示例#2
0
 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);
 }
示例#3
0
 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);
 }
示例#4
0
 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);
 }
示例#5
0
 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);
 }
示例#6
0
                public void Tab()
                {
                    Create("\tcat");
                    var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0));

                    AssertPoint(point, '\t');
                }
示例#7
0
                public void Normal()
                {
                    Create("\tcat");
                    var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(1));

                    AssertPoint(point, 'c');
                }
示例#8
0
                public void Wide()
                {
                    Create("\tあcat");
                    var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(1));

                    AssertPoint(point, 'あ');
                }
示例#9
0
 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);
                }
示例#11
0
 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);
                }
示例#13
0
                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);
                }
示例#14
0
                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);
                }
示例#15
0
                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);
                }
示例#16
0
                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);
                }
示例#17
0
 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());
 }
示例#18
0
 public void Tab()
 {
     Create("\tcat");
     var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0));
     AssertPoint(point, '\t');
 }
示例#19
0
 public void Normal()
 {
     Create("\tcat");
     var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(1));
     AssertPoint(point, 'c');
 }
示例#20
0
 public void Wide()
 {
     Create("\t\u3042cat");
     var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(1));
     AssertPoint(point, '\u3042');
 }