use of org.eclipse.jface.text.IRegion in project eclipse.platform.text by eclipse.
the class ProjectionDocumentTest method test29_25.
@Test
public void test29_25() {
// test computation of unprojected master regions
// spanning multiple fragments
// starting inside fragment
// ending touching right fragment border
IRegion[] expected = { new Region(80, 20), new Region(120, 20) };
assertUnprojectedMasterRegions(expected, 70, 90);
}
use of org.eclipse.jface.text.IRegion in project eclipse.platform.text by eclipse.
the class ProjectionDocumentTest method test29_35.
@Test
public void test29_35() {
// test computation of unprojected master regions
// spanning multiple fragments
// starting right of fragment
// ending touching right fragment border
IRegion[] expected = { new Region(50, 10), new Region(80, 20), new Region(120, 20) };
assertUnprojectedMasterRegions(expected, 50, 110);
}
use of org.eclipse.jface.text.IRegion in project eclipse.platform.text by eclipse.
the class ProjectionDocumentTest method test29_18.
@Test
public void test29_18() {
// test computation of unprojected master regions
// spanning multiple fragments
// starting touching left fragment border
// ending touching left fragment border
IRegion[] expected = { new Region(80, 20), new Region(120, 20) };
assertUnprojectedMasterRegions(expected, 60, 80);
}
use of org.eclipse.jface.text.IRegion in project eclipse.platform.text by eclipse.
the class ProjectionDocumentTest method test29_26.
@Test
public void test29_26() {
// test computation of unprojected master regions
// spanning multiple fragments
// starting inside fragment
// ending right of fragment
IRegion[] expected = { new Region(80, 20), new Region(120, 10) };
assertUnprojectedMasterRegions(expected, 70, 60);
}
use of org.eclipse.jface.text.IRegion in project eclipse.platform.text by eclipse.
the class ProjectionDocumentTest method test29_37.
@Test
public void test29_37() {
// test computation of unprojected master regions
createProjectionB();
try {
IRegion[] regions = fSlaveDocument.computeUnprojectedMasterRegions(0, 180);
IRegion[] expected = { new Region(0, 20), new Region(40, 20), new Region(80, 20), new Region(120, 20), new Region(160, 20) };
assertRegions(expected, regions);
} catch (BadLocationException e) {
assertTrue(false);
}
}
Aggregations