From 88d14aad1057295e6dc2cb3528e7c7851b9ceb42 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 c66d1ccc7c1..0636621b969 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 @@ -342,8 +342,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(); }