Example #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());
 }
Example #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);
 }
Example #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);
 }
Example #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);
 }
Example #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);
 }
Example #6
0
                public void Tab()
                {
                    Create("\tcat");
                    var point = new SnapshotOverlapPoint(_textBuffer.GetPoint(0));

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

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

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