Esempio n. 1
0
        static void Test_GetLineRangeWithEol()
        {
            int                         head, end;
            TextBuffer                  text;
            SplitArray <int>            lhi;
            SplitArray <LineDirtyState> lds;

            MakeTestData(out text, out lhi, out lds);

            LineLogic.GetLineRangeWithEol(text, lhi, 0, out head, out end);
            TestUtl.AssertEquals(0, head);
            TestUtl.AssertEquals(32, end);
            LineLogic.GetLineRangeWithEol(text, lhi, 1, out head, out end);
            TestUtl.AssertEquals(32, head);
            TestUtl.AssertEquals(33, end);
            LineLogic.GetLineRangeWithEol(text, lhi, 2, out head, out end);
            TestUtl.AssertEquals(33, head);
            TestUtl.AssertEquals(37, end);
            LineLogic.GetLineRangeWithEol(text, lhi, 3, out head, out end);
            TestUtl.AssertEquals(37, head);
            TestUtl.AssertEquals(38, end);
            LineLogic.GetLineRangeWithEol(text, lhi, 4, out head, out end);
            TestUtl.AssertEquals(38, head);
            TestUtl.AssertEquals(52, end);
            LineLogic.GetLineRangeWithEol(text, lhi, 5, out head, out end);
            TestUtl.AssertEquals(52, head);
            TestUtl.AssertEquals(53, end);
            LineLogic.GetLineRangeWithEol(text, lhi, 6, out head, out end);
            TestUtl.AssertEquals(53, head);
            TestUtl.AssertEquals(71, end);
        }