From 0864e0157f2bad845c1dbb51b889fdbdbd28a61a Mon Sep 17 00:00:00 2001 From: raghucssit Date: Mon, 15 Sep 2025 14:06:36 +0200 Subject: [PATCH] Improve Display test assert message. --- .../tests/junit/Test_org_eclipse_swt_widgets_Display.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java index 3e19b0d26d..a243909517 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Display.java @@ -343,8 +343,10 @@ public void test_getCursorLocation() { try { Point pt = display.getCursorLocation(); assertNotNull(pt); - assertTrue(pt.x >= 0); - assertTrue(pt.y >= 0); + assertTrue(pt.x >= 0, + "Display's cursor location x co-ordinate should be positive. But it is: " + pt.x); + assertTrue(pt.y >= 0, + "Display's cursor location y co-ordinate should be positive. But it is: " + pt.y); } finally { display.dispose(); }