Пример #1
0
        public void FindNextWordStart2()
        {
            Create("foo bar");
            var p = TssUtil.FindNextWordStart(new SnapshotPoint(_snapshot, 0), 1, WordKind.NormalWord);

            Assert.AreEqual(4, p.Position);
        }
Пример #2
0
        public void FindNextWordStart7()
        {
            Create("foo bar jazz");
            var next = TssUtil.FindNextWordStart(_snapshot.GetPoint(0), 2, WordKind.NormalWord);

            Assert.AreEqual('j', next.GetChar());
        }
Пример #3
0
        public void FindNextWordStart3()
        {
            Create("foo", "bar baz");
            var line = _snapshot.GetLineFromLineNumber(1);
            var p    = TssUtil.FindNextWordStart(line.Start, 1, WordKind.NormalWord);

            Assert.AreNotEqual(line.Start, p);
        }
Пример #4
0
        public void FindNextWordStart6()
        {
            Create("foo bar");
            var line  = _snapshot.GetLineFromLineNumber(0);
            var point = line.Start.Add(5);
            var other = TssUtil.FindNextWordStart(point, 1, WordKind.NormalWord);

            Assert.AreEqual(line.End, other);
        }
Пример #5
0
        public void FindNextWordStart5()
        {
            Create("foo", "bar daz");
            var line  = _snapshot.GetLineFromLineNumber(0);
            var point = TssUtil.FindNextWordStart(line.End, 1, WordKind.NormalWord);
            var other = _snapshot.GetLineFromLineNumber(1);

            Assert.AreEqual(other.Start, point);
        }
Пример #6
0
        public void FindNextWordStart4()
        {
            Create("foo", "bar caz dang");
            var line = _snapshot.GetLineFromLineNumber(1);
            var p    = line.Start + 4;

            Assert.AreEqual('c', p.GetChar());
            var p2 = TssUtil.FindNextWordStart(line.Start + 4, 1, WordKind.NormalWord);

            Assert.AreNotEqual(p2, p);
            Assert.AreEqual(p + 4, p2);
        }