Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2006 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2008 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 17-22
Link Here
|
17 |
import org.eclipse.compare.rangedifferencer.IRangeComparator; |
17 |
import org.eclipse.compare.rangedifferencer.IRangeComparator; |
18 |
import org.eclipse.jface.text.Document; |
18 |
import org.eclipse.jface.text.Document; |
19 |
import org.eclipse.jface.text.IDocument; |
19 |
import org.eclipse.jface.text.IDocument; |
|
|
20 |
import org.eclipse.jface.text.Region; |
20 |
|
21 |
|
21 |
public class DocLineComparatorTest extends TestCase { |
22 |
public class DocLineComparatorTest extends TestCase { |
22 |
|
23 |
|
Lines 70-73
Link Here
|
70 |
|
71 |
|
71 |
Assert.assertTrue(comp1.rangesEqual(0, comp2, 0)); |
72 |
Assert.assertTrue(comp1.rangesEqual(0, comp2, 0)); |
72 |
} |
73 |
} |
|
|
74 |
|
75 |
public void testBug259422() { |
76 |
IDocument doc= new Document(); |
77 |
doc.set(""); //$NON-NLS-1$ |
78 |
|
79 |
IRangeComparator comp1= new DocLineComparator(doc, null, true); |
80 |
IRangeComparator comp2= new DocLineComparator(doc, new Region(0, doc.getLength()), true); |
81 |
|
82 |
Assert.assertTrue(comp1.rangesEqual(0, comp2, 0)); |
83 |
|
84 |
} |
73 |
} |
85 |
} |