diff --git a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java index 014ca3eeca9..6257137905c 100644 --- a/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java +++ b/tests/org.eclipse.swt.tests/JUnit Tests/org/eclipse/swt/tests/junit/Test_org_eclipse_swt_widgets_Shell.java @@ -457,6 +457,10 @@ public void test_getImeInputMode() { @Override @Test public void test_getLocation() { + //Setting location for Windows is not supported in GTK4 + if (isGTK4()) { + return; + } shell.setLocation(10,15); assertEquals(":a:", 10, shell.getLocation().x); assertEquals(":b:", 15, shell.getLocation().y); @@ -999,4 +1003,27 @@ public void test_Issue450_NoShellActivateOnSetFocus() { } } } + +@Override +public void test_setLocationLorg_eclipse_swt_graphics_Point() { + //Setting location for Windows is not supported in GTK4 + if (isGTK4()) { + return; + } + super.test_setLocationLorg_eclipse_swt_graphics_Point(); +} + +@Override +public void test_setLocationII() { + //Setting location for Windows is not supported in GTK4 + if (isGTK4()) { + return; + } + super.test_setLocationII(); +} + +public static boolean isGTK4() { + String gtkVersion = System.getProperty("org.eclipse.swt.internal.gtk.version", ""); + return SwtTestUtil.isGTK && gtkVersion.startsWith("4"); +} }