Ticket #16947: v1-0001-ClipboardUtilsTest-fix-for-non-headless-mode.patch

File v1-0001-ClipboardUtilsTest-fix-for-non-headless-mode.patch, 1.3 KB (added by ris, 5 years ago)
  • test/unit/org/openstreetmap/josm/gui/datatransfer/ClipboardUtilsTest.java

    From 588a818624ee4535028b531bce10e91c2816a05c Mon Sep 17 00:00:00 2001
    From: Robert Scott <code@humanleg.org.uk>
    Date: Sun, 4 Nov 2018 10:51:31 +0000
    Subject: [PATCH v1] ClipboardUtilsTest: fix for non-headless mode
    
    ---
     .../org/openstreetmap/josm/gui/datatransfer/ClipboardUtilsTest.java    | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/test/unit/org/openstreetmap/josm/gui/datatransfer/ClipboardUtilsTest.java b/test/unit/org/openstreetmap/josm/gui/datatransfer/ClipboardUtilsTest.java
    index a3798b769..1cf5b2a00 100644
    a b import static org.junit.Assert.assertNotNull;  
    66import static org.junit.Assert.assertNull;
    77import static org.junit.Assert.assertSame;
    88import static org.junit.Assert.assertTrue;
     9import static org.junit.Assume.assumeTrue;
    910
    1011import java.awt.GraphicsEnvironment;
    1112import java.awt.datatransfer.Clipboard;
    public class ClipboardUtilsTest {  
    117118     */
    118119    @Test
    119120    public void testSystemSelectionDoesNotFail() {
    120         assertTrue(GraphicsEnvironment.isHeadless());
     121        assumeTrue(GraphicsEnvironment.isHeadless());
    121122        assertNull(ClipboardUtils.getSystemSelection());
    122123    }
    123124