| Summary: | jUnits needed for caret querying API | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Randy Hudson <hudsonr> | ||||
| Component: | GEF-Legacy Draw2d | Assignee: | Anthony Hunter <ahunter.eclipse> | ||||
| Status: | RESOLVED WONTFIX | QA Contact: | |||||
| Severity: | enhancement | ||||||
| Priority: | P3 | CC: | ahunter.eclipse, mattscar | ||||
| Version: | unspecified | Keywords: | helpwanted | ||||
| Target Milestone: | 3.5.0 (Galileo) M4 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Randy Hudson
Created attachment 75899 [details]
Patch for org.eclipse.draw2d.test.CaretTests.java
This patch contains test cases for the getOffset(), getNextOffset(), and getCaretPlacement() methods. Works fine on Windows, but I haven't tested other OSes.
Test three did fail on Linux so I changed it to:
public void testCaretPlacement() {
offsetPoint = new Point(11, 21);
offset = sentence.getOffset(offsetPoint, trail, null);
CaretInfo info = sentence.getCaretPlacement(offset, trail[0] != 0);
if (info.getBaseline() == 24) {
// Windows XP
assertEquals(info.getBaseline(), 24);
assertEquals(info.getHeight(), 13);
assertEquals(info.getLineHeight(), 13);
assertEquals(info.getLineY(), 13);
assertEquals(info.getX(), 12);
assertEquals(info.getY(), 13);
} else {
// Red Hat Linux
assertEquals(info.getBaseline(), 25);
assertEquals(info.getHeight(), 14);
assertEquals(info.getLineHeight(), 14);
assertEquals(info.getLineY(), 14);
assertEquals(info.getX(), 13);
assertEquals(info.getY(), 14);
}
}
Otherwise I committed to HEAD.
Hi Matt, There is still failures on a different Linux OS: http://emft.eclipse.org/gef//downloads/drops//3.5.0/I200810211645/testresults/html/org.eclipse.draw2d.test_linux.gtk.html info.getBaseline() is 24 on Windows XP, 25 on RedHat Linux and 27 on another Linux. What does this mean? I commented out the tests for 3.5 M3. If the tests are not fixed for 3.5 M4 we will have to remove this contribution. Matt was not even CCed on the Bug and did not realize we were waiting for him. Matt, need your answers here. (In reply to comment #3) > Hi Matt, > > There is still failures on a different Linux OS: > > http://emft.eclipse.org/gef//downloads/drops//3.5.0/I200810211645/testresults/html/org.eclipse.draw2d.test_linux.gtk.html > > info.getBaseline() is 24 on Windows XP, 25 on RedHat Linux and 27 on another > Linux. > > What does this mean? > (In reply to comment #4) > I commented out the tests for 3.5 M3. > > If the tests are not fixed for 3.5 M4 we will have to remove this contribution. > (In reply to comment #4) > I commented out the tests for 3.5 M3. > > If the tests are not fixed for 3.5 M4 we will have to remove this contribution. > Gone for now. |