示例#1
0
 public void GetOffset()
 {
     document.Text = "Hello,\nWorld!";
     Assert.AreEqual(0, document.GetOffset(1, 1));
     Assert.AreEqual(1, document.GetOffset(1, 2));
     Assert.AreEqual(5, document.GetOffset(1, 6));
     Assert.AreEqual(6, document.GetOffset(1, 7));
     Assert.AreEqual(7, document.GetOffset(2, 1));
     Assert.AreEqual(8, document.GetOffset(2, 2));
     Assert.AreEqual(12, document.GetOffset(2, 6));
     Assert.AreEqual(13, document.GetOffset(2, 7));
 }