public void TryGetPreviousPointOnLine3() { Create("foo", "bar"); var point = _textBuffer.GetLine(0).Start; var res = SnapshotPointUtil.TryGetPreviousPointOnLine(point, 1); Assert.IsFalse(res.IsSome()); }
public void TryGetPreviousPointOnLine2() { Create("foo", "bar"); var point = _textBuffer.GetLine(0).Start.Add(1); var res = SnapshotPointUtil.TryGetPreviousPointOnLine(point, 1); Assert.IsTrue(res.IsSome()); Assert.AreEqual(_textBuffer.GetLine(0).Start, res.Value); }
public void TryGetPreviousPointOnLine1() { Create("foo", "bar"); var point = _textBuffer.GetLine(0).End.Subtract(1); var res = SnapshotPointUtil.TryGetPreviousPointOnLine(point, 1); Assert.True(res.IsSome()); Assert.Equal(point.Subtract(1), res.Value); }