Ejemplo n.º 1
0
                public void Complete()
                {
                    Create("あいうえお");
                    var span = new SnapshotOverlapSpan(_textBuffer.GetSpan(0, 2));

                    Assert.Equal("あい", span.GetText());
                }
Ejemplo n.º 2
0
                public void Complete()
                {
                    Create("\u3042\u3044\u3046\u3048\u304A");
                    var span = new SnapshotOverlapSpan(_textBuffer.GetSpan(0, 2));

                    Assert.Equal("\u3042\u3044", span.GetText());
                }
Ejemplo n.º 3
0
 public void BeforePartial()
 {
     Create("\tcat\t");
     var span = new SnapshotOverlapSpan(
         new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 1, totalSpaces: 4),
         new SnapshotOverlapPoint(_textBuffer.GetPoint(2), beforeSpaces: 0, totalSpaces: 1));
     Assert.Equal("   c", span.GetText());
 }
Ejemplo n.º 4
0
 public void AfterComplete()
 {
     Create("\tcat\t");
     var span = new SnapshotOverlapSpan(
         new SnapshotOverlapPoint(_textBuffer.GetPoint(3), before: 0, width: 1),
         new SnapshotOverlapPoint(_textBuffer.GetPoint(5), before: 0, width: 1));
     Assert.Equal("t\t", span.GetText());
 }
Ejemplo n.º 5
0
 public void AfterPartial()
 {
     Create("\tcat\t");
     var span = new SnapshotOverlapSpan(
         new SnapshotOverlapPoint(_textBuffer.GetPoint(3), beforeSpaces: 0, totalSpaces: 1),
         new SnapshotOverlapPoint(_textBuffer.GetPoint(4), beforeSpaces: 3, totalSpaces: 4));
     Assert.Equal("t   ", span.GetText());
 }
Ejemplo n.º 6
0
            public void Simple()
            {
                Create("cat");
                var span = new SnapshotOverlapSpan(
                    new SnapshotOverlapPoint(_textBuffer.GetPoint(0), before: 0, width: 1),
                    new SnapshotOverlapPoint(_textBuffer.GetPoint(1), before: 0, width: 1));

                Assert.Equal(_textBuffer.GetPoint(1), span.OverarchingEnd);
            }
Ejemplo n.º 7
0
                public void AfterPartial()
                {
                    Create("\tcat\t");
                    var span = new SnapshotOverlapSpan(
                        new SnapshotOverlapPoint(_textBuffer.GetPoint(3), beforeSpaces: 0, totalSpaces: 1),
                        new SnapshotOverlapPoint(_textBuffer.GetPoint(4), beforeSpaces: 3, totalSpaces: 4));

                    Assert.Equal("t   ", span.GetText());
                }
Ejemplo n.º 8
0
                public void BeforePartial()
                {
                    Create("\tcat\t");
                    var span = new SnapshotOverlapSpan(
                        new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 1, totalSpaces: 4),
                        new SnapshotOverlapPoint(_textBuffer.GetPoint(2), beforeSpaces: 0, totalSpaces: 1));

                    Assert.Equal("   c", span.GetText());
                }
Ejemplo n.º 9
0
            public void Empty()
            {
                Create("\t");
                var span = new SnapshotOverlapSpan(
                    new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 0, totalSpaces: 8),
                    new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 2, totalSpaces: 8));

                Assert.Equal(0, span.InnerSpan.Length);
            }
Ejemplo n.º 10
0
            public void Single()
            {
                Create("\tcat");
                var span = new SnapshotOverlapSpan(
                    new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 0, totalSpaces: 8),
                    new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 2, totalSpaces: 8));

                Assert.Equal(1, span.OverarchingSpan.Length);
            }
Ejemplo n.º 11
0
            public void EndPartial()
            {
                Create("c\tt");
                var span = new SnapshotOverlapSpan(
                    new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 0, totalSpaces: 1),
                    new SnapshotOverlapPoint(_textBuffer.GetPoint(1), beforeSpaces: 1, totalSpaces: 4));

                Assert.Equal(_textBuffer.GetPoint(2), span.OverarchingEnd);
            }
Ejemplo n.º 12
0
                public void AfterComplete()
                {
                    Create("\tcat\t");
                    var span = new SnapshotOverlapSpan(
                        new SnapshotOverlapPoint(_textBuffer.GetPoint(3), before: 0, width: 1),
                        new SnapshotOverlapPoint(_textBuffer.GetPoint(5), before: 0, width: 1));

                    Assert.Equal("t\t", span.GetText());
                }
Ejemplo n.º 13
0
 public void Empty()
 {
     Create("\t");
     var span = new SnapshotOverlapSpan(
         new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 0, totalSpaces: 8),
         new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 2, totalSpaces: 8));
     Assert.Equal(0, span.InnerSpan.Length);
 }
Ejemplo n.º 14
0
 public void Single()
 {
     Create("\tcat");
     var span = new SnapshotOverlapSpan(
         new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 0, totalSpaces: 8),
         new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 2, totalSpaces: 8));
     Assert.Equal(1, span.OverarchingSpan.Length);
 }
Ejemplo n.º 15
0
 public void EndPartial()
 {
     Create("c\tt");
     var span = new SnapshotOverlapSpan(
         new SnapshotOverlapPoint(_textBuffer.GetPoint(0), beforeSpaces: 0, totalSpaces: 1),
         new SnapshotOverlapPoint(_textBuffer.GetPoint(1), beforeSpaces: 1, totalSpaces: 4));
     Assert.Equal(_textBuffer.GetPoint(2), span.OverarchingEnd);
 }
Ejemplo n.º 16
0
 public void Complete()
 {
     Create("あいうえお");
     var span = new SnapshotOverlapSpan(_textBuffer.GetSpan(0, 2));
     Assert.Equal("あい", span.GetText());
 }
Ejemplo n.º 17
0
 public void Complete()
 {
     Create("\u3042\u3044\u3046\u3048\u304A");
     var span = new SnapshotOverlapSpan(_textBuffer.GetSpan(0, 2));
     Assert.Equal("\u3042\u3044", span.GetText());
 }
Ejemplo n.º 18
0
 public void Simple()
 {
     Create("cat");
     var span = new SnapshotOverlapSpan(
         new SnapshotOverlapPoint(_textBuffer.GetPoint(0), before: 0, width: 1),
         new SnapshotOverlapPoint(_textBuffer.GetPoint(1), before: 0, width: 1));
     Assert.Equal(_textBuffer.GetPoint(1), span.OverarchingEnd);
 }