Skip to content

Commit 0da2da9

Browse files
committed
Improve Display test assert message.
1 parent 508ad4a commit 0da2da9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,10 @@ public void test_getCursorLocation() {
342342
try {
343343
Point pt = display.getCursorLocation();
344344
assertNotNull(pt);
345-
assertTrue(pt.x >= 0);
346-
assertTrue(pt.y >= 0);
345+
assertTrue(pt.x >= 0,
346+
"Display's cursor location x co-ordinate should be positive. But it is: " + pt.x);
347+
assertTrue(pt.y >= 0,
348+
"Display's cursor location y co-ordinate should be positive. But it is: " + pt.y);
347349
} finally {
348350
display.dispose();
349351
}

0 commit comments

Comments
 (0)