X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Futil%2FPlatformTest.java;h=c8616adf1e6261f351f5e7e24aa355116f1a7b10;hb=278ab954b415ed6682b77e35600a1e55c5d5b2d6;hp=307f4507e3c96ce0133fe0033556289b1dc691cb;hpb=19424d4e1623bfcdcf30567f7a233fe81c4a9e4e;p=jalview.git diff --git a/test/jalview/util/PlatformTest.java b/test/jalview/util/PlatformTest.java index 307f450..c8616ad 100644 --- a/test/jalview/util/PlatformTest.java +++ b/test/jalview/util/PlatformTest.java @@ -27,6 +27,7 @@ import jalview.gui.JvOptionPane; import java.awt.Button; import java.awt.Event; +import java.awt.Toolkit; import java.awt.event.MouseEvent; import org.testng.annotations.BeforeClass; @@ -51,6 +52,21 @@ public class PlatformTest @Test(groups = "Functional") public void testIsControlDown_mac() { + String toolkit = Toolkit.getDefaultToolkit().getClass().getName(); + if (toolkit.endsWith("XToolkit") || toolkit.endsWith("WToolkit")) + { + /* + * this toolkit on the build server fails these tests, + * because it returns 2, not 4, for getMenuShortcutKeyMask + * + * Same for windows, because the Platform test "mac" must match the + * actual platform that is running the test. + * + * + */ + return; + } + int clickCount = 1; boolean isPopupTrigger = false; int buttonNo = MouseEvent.BUTTON1;