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

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

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

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