Package com.google.collide.shared.document

Examples of com.google.collide.shared.document.LineInfo.line()


    // Test offset due to carriage return is correct
    int length = lineInfo.line().length();
    x = assertReversibleAndReturnX(lineInfo.line(), length - 3);
    assertWideCharsAndZeroWidthChars(length - 3, 0, 0, x);

    x = assertReversibleAndReturnXAccountingForZeroWidth(lineInfo.line(), length - 2, 1);
    assertWideCharsAndZeroWidthChars(length - 2, 0, 0, x);

    x = assertReversibleAndReturnXAccountingForZeroWidth(lineInfo.line(), length - 1, 0);
    assertWideCharsAndZeroWidthChars(length - 1, 0, 1, x);
  }
View Full Code Here


    assertWideCharsAndZeroWidthChars(length - 3, 0, 0, x);

    x = assertReversibleAndReturnXAccountingForZeroWidth(lineInfo.line(), length - 2, 1);
    assertWideCharsAndZeroWidthChars(length - 2, 0, 0, x);

    x = assertReversibleAndReturnXAccountingForZeroWidth(lineInfo.line(), length - 1, 0);
    assertWideCharsAndZeroWidthChars(length - 1, 0, 1, x);
  }

  public void testBothTabAndCarriageReturn() {
    calculator.handleDocumentChange(indentAndCarriageReturnDocument);
View Full Code Here

  public void testBothTabAndCarriageReturn() {
    calculator.handleDocumentChange(indentAndCarriageReturnDocument);

    LineInfo lineTwo = SearchTestsUtil.gotoLineInfo(indentAndCarriageReturnDocument, 2);
    double x = assertReversibleAndReturnX(lineTwo.line(), 1);
    assertWideChars(1, 1, x);

    x = assertReversibleAndReturnX(lineTwo.line(), 2);
    assertWideChars(2, 1, x);
View Full Code Here

    LineInfo lineTwo = SearchTestsUtil.gotoLineInfo(indentAndCarriageReturnDocument, 2);
    double x = assertReversibleAndReturnX(lineTwo.line(), 1);
    assertWideChars(1, 1, x);

    x = assertReversibleAndReturnX(lineTwo.line(), 2);
    assertWideChars(2, 1, x);

    x = assertReversibleAndReturnX(lineTwo.line(), 10);
    assertWideChars(10, 1, x);
View Full Code Here

    assertWideChars(1, 1, x);

    x = assertReversibleAndReturnX(lineTwo.line(), 2);
    assertWideChars(2, 1, x);

    x = assertReversibleAndReturnX(lineTwo.line(), 10);
    assertWideChars(10, 1, x);

    // Test offset due to carriage return is correct
    int length = lineTwo.line().length();
    x = assertReversibleAndReturnX(lineTwo.line(), length - 3);
View Full Code Here

    x = assertReversibleAndReturnX(lineTwo.line(), 10);
    assertWideChars(10, 1, x);

    // Test offset due to carriage return is correct
    int length = lineTwo.line().length();
    x = assertReversibleAndReturnX(lineTwo.line(), length - 3);
    assertWideCharsAndZeroWidthChars(length - 3, 1, 0, x);

    x = assertReversibleAndReturnXAccountingForZeroWidth(lineTwo.line(), length - 2, 1);
    assertWideCharsAndZeroWidthChars(length - 2, 1, 0, x);
View Full Code Here

    x = assertReversibleAndReturnX(lineTwo.line(), 10);
    assertWideChars(10, 1, x);

    // Test offset due to carriage return is correct
    int length = lineTwo.line().length();
    x = assertReversibleAndReturnX(lineTwo.line(), length - 3);
    assertWideCharsAndZeroWidthChars(length - 3, 1, 0, x);

    x = assertReversibleAndReturnXAccountingForZeroWidth(lineTwo.line(), length - 2, 1);
    assertWideCharsAndZeroWidthChars(length - 2, 1, 0, x);
View Full Code Here

    // Test offset due to carriage return is correct
    int length = lineTwo.line().length();
    x = assertReversibleAndReturnX(lineTwo.line(), length - 3);
    assertWideCharsAndZeroWidthChars(length - 3, 1, 0, x);

    x = assertReversibleAndReturnXAccountingForZeroWidth(lineTwo.line(), length - 2, 1);
    assertWideCharsAndZeroWidthChars(length - 2, 1, 0, x);

    x = assertReversibleAndReturnX(lineTwo.line(), length - 1);
    assertWideCharsAndZeroWidthChars(length - 1, 1, 1, x);
  }
View Full Code Here

    assertWideCharsAndZeroWidthChars(length - 3, 1, 0, x);

    x = assertReversibleAndReturnXAccountingForZeroWidth(lineTwo.line(), length - 2, 1);
    assertWideCharsAndZeroWidthChars(length - 2, 1, 0, x);

    x = assertReversibleAndReturnX(lineTwo.line(), length - 1);
    assertWideCharsAndZeroWidthChars(length - 1, 1, 1, x);
  }

  public void testLineWithAllTabsAndCarriageReturn() {
    calculator.handleDocumentChange(indentAndCarriageReturnDocument);
View Full Code Here

  public void testLineWithAllTabsAndCarriageReturn() {
    calculator.handleDocumentChange(indentAndCarriageReturnDocument);

    LineInfo lineThree = SearchTestsUtil.gotoLineInfo(indentAndCarriageReturnDocument, 3);
    double x = assertReversibleAndReturnX(lineThree.line(), 1);
    assertWideChars(1, 1, x);

    x = assertReversibleAndReturnX(lineThree.line(), 2);
    assertWideChars(2, 2, x);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.