Skip to content

Commit 0864e01

Browse files
raghucssitakurtakov
authored andcommitted
Improve Display test assert message.
1 parent 079d2a9 commit 0864e01

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
@@ -343,8 +343,10 @@ public void test_getCursorLocation() {
343343
try {
344344
Point pt = display.getCursorLocation();
345345
assertNotNull(pt);
346-
assertTrue(pt.x >= 0);
347-
assertTrue(pt.y >= 0);
346+
assertTrue(pt.x >= 0,
347+
"Display's cursor location x co-ordinate should be positive. But it is: " + pt.x);
348+
assertTrue(pt.y >= 0,
349+
"Display's cursor location y co-ordinate should be positive. But it is: " + pt.y);
348350
} finally {
349351
display.dispose();
350352
}

0 commit comments

Comments
 (0)