Package org.codehaus.jparsec

Examples of org.codehaus.jparsec.DefaultSourceLocator.lookup()


    assertEquals(0, DefaultSourceLocator.binarySearch(intList(), 1));
  }
 
  public void testLookup_noLineBreaksScanned() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    assertEquals(new Location(2, 4), locator.lookup(1));
  }
 
  public void testLookup_inFirstLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
View Full Code Here


  }
 
  public void testLookup_inFirstLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
    assertEquals(new Location(2, 4), locator.lookup(1));
  }
 
  public void testLookup_firstLineBreak() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
View Full Code Here

  }
 
  public void testLookup_firstLineBreak() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
    assertEquals(new Location(2, 6), locator.lookup(3));
  }
 
  public void testLookup_firstCharInSecondLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
View Full Code Here

  }
 
  public void testLookup_firstCharInSecondLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
    assertEquals(new Location(3, 1), locator.lookup(4));
  }
 
  public void testLookup_lastCharInSecondLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
View Full Code Here

  }
 
  public void testLookup_lastCharInSecondLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
    assertEquals(new Location(3, 2), locator.lookup(5));
  }
 
  public void testLookup_firstCharInThirdLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
View Full Code Here

  }
 
  public void testLookup_firstCharInThirdLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
    assertEquals(new Location(4, 1), locator.lookup(6));
  }
 
  public void testLookup_lastCharInThirdLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
View Full Code Here

  }
 
  public void testLookup_lastCharInThirdLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
    assertEquals(new Location(4, 2), locator.lookup(7));
  }
 
  public void testLookup_firstCharInLastLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
View Full Code Here

  }
 
  public void testLookup_firstCharInLastLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
    assertEquals(new Location(5, 1), locator.lookup(8));
  }
 
  public void testLookup_secondCharInLastLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
View Full Code Here

  }
 
  public void testLookup_secondCharInLastLine() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    addLineBreaks(locator, 3, 5, 7);
    assertEquals(new Location(5, 2), locator.lookup(9));
  }
 
  public void testScanTo_indexOutOfBounds() {
    DefaultSourceLocator locator = new DefaultSourceLocator("whatever", 2, 3);
    try {
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.