Skip to content

Commit 5da44c6

Browse files
committed
Repair and execute disabled Swing tests
1 parent 7ac870b commit 5da44c6

22 files changed

+72
-142
lines changed

org.eclipse.wb.tests/META-INF/MANIFEST.MF

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ Export-Package: org.eclipse.wb.tests.designer;x-internal:=true,
149149
org.eclipse.wb.tests.utils;x-internal:=true
150150
Import-Package: com.jgoodies.forms.factories;version="[1.9.0,2.0.0]",
151151
com.jgoodies.forms.layout;version="[1.9.0,2.0.0]",
152+
com.jgoodies.forms.util;version="[1.9.0,2.0.0)",
152153
net.miginfocom.layout;version="[11.3.0,12.0.0]",
153154
net.miginfocom.swing;version="[11.3.0,12.0.0]",
154155
org.apache.commons.collections4;version="[4.4.0,5.0.0)",
1.33 MB
Binary file not shown.

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/swing/model/bean/ActionGefTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
import org.apache.commons.lang3.function.FailableConsumer;
3333
import org.apache.commons.lang3.function.FailableRunnable;
34-
import org.junit.jupiter.api.Disabled;
3534
import org.junit.jupiter.api.Test;
3635

3736
import javax.swing.JButton;
@@ -232,7 +231,6 @@ public Test() {
232231
/**
233232
* Test for {@link ActionExternalEntryInfo}.
234233
*/
235-
@Disabled
236234
@Test
237235
public void test_JToolBar_ActionExternalEntryInfo() throws Exception {
238236
createExternalAction();

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/swing/model/bean/ActionTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2024 Google, Inc. and others.
2+
* Copyright (c) 2011, 2025 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -55,7 +55,6 @@
5555

5656
import org.assertj.core.api.Assertions;
5757
import org.assertj.core.util.Lists;
58-
import org.junit.jupiter.api.Disabled;
5958
import org.junit.jupiter.api.Test;
6059

6160
import java.util.ArrayList;
@@ -1594,18 +1593,20 @@ public void test_anonymous_properties_inConstructorArgument() throws Exception {
15941593
/**
15951594
* Test for {@link ActionInfo#getPresentation()}.
15961595
*/
1597-
@Disabled
15981596
@Test
15991597
public void test_presentation() throws Exception {
16001598
m_waitForAutoBuild = true;
1599+
1600+
setFileContentSrc("Test.png", "");
1601+
16011602
ContainerInfo panel =
16021603
parseContainer(
16031604
"public class Test extends JPanel {",
16041605
" private Action action_1 = new Action_1();",
16051606
" private Action action_2 = new Action_2();",
16061607
" private class Action_1 extends AbstractAction {",
16071608
" public Action_1() {",
1608-
" putValue(SMALL_ICON, new ImageIcon(Test.class.getResource('/javax/swing/plaf/basic/icons/JavaCup16.png')));",
1609+
" putValue(SMALL_ICON, new ImageIcon(Test.class.getResource('/Test.png')));",
16091610
" }",
16101611
" public void actionPerformed(ActionEvent e) {",
16111612
" }",

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/swing/model/component/ComponentTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2024 Google, Inc. and others.
2+
* Copyright (c) 2011, 2025 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -31,7 +31,6 @@
3131
import org.eclipse.swt.graphics.ImageData;
3232
import org.eclipse.swt.graphics.RGB;
3333

34-
import org.junit.jupiter.api.Disabled;
3534
import org.junit.jupiter.api.Test;
3635

3736
import java.awt.Component;
@@ -88,7 +87,6 @@ public void test_clearSwingTree_removeAll_NPE() throws Exception {
8887
/**
8988
* We can not create {@link java.awt.Image} with zero size, so we should check this.
9089
*/
91-
@Disabled
9290
@Test
9391
public void test_zeroSize() throws Exception {
9492
ContainerInfo panel =

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/swing/model/component/JSpinnerTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011 Google, Inc.
2+
* Copyright (c) 2011, 2025 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -23,7 +23,6 @@
2323
import org.eclipse.wb.tests.designer.Expectations.StrValue;
2424
import org.eclipse.wb.tests.designer.swing.SwingModelTest;
2525

26-
import org.junit.jupiter.api.Disabled;
2726
import org.junit.jupiter.api.Test;
2827

2928
import java.lang.reflect.Field;
@@ -142,7 +141,6 @@ public void test_dateModel_getDateStep() throws Exception {
142141
0xDEADBEEF));
143142
}
144143

145-
@Disabled
146144
@Test
147145
public void test_dateModel() throws Exception {
148146
String source =

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/swing/model/layout/FormLayout/DefaultComponentFactoryTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2024 Google, Inc. and others.
2+
* Copyright (c) 2011, 2025 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -29,7 +29,6 @@
2929
import com.jgoodies.forms.factories.DefaultComponentFactory;
3030

3131
import org.assertj.core.api.Assertions;
32-
import org.junit.jupiter.api.Disabled;
3332
import org.junit.jupiter.api.Test;
3433

3534
/**
@@ -109,7 +108,6 @@ public void test_createLabel() throws Exception {
109108
* Test for {@link DefaultComponentFactoryCreateLabelEntryInfo}.
110109
*/
111110
@DisposeProjectAfter
112-
@Disabled
113111
@Test
114112
public void test_createLabel_tool() throws Exception {
115113
do_projectDispose();

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/swing/model/layout/FormLayout/FormDimensionInfoTest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011, 2023 Google, Inc.
2+
* Copyright (c) 2011, 2025 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -26,7 +26,6 @@
2626
import com.jgoodies.forms.layout.Size;
2727
import com.jgoodies.forms.layout.Sizes;
2828

29-
import org.junit.jupiter.api.Disabled;
3029
import org.junit.jupiter.api.Test;
3130

3231
import java.lang.reflect.Method;
@@ -266,7 +265,6 @@ public void test_rowTemplates() throws Exception {
266265
// Convert to GAP template
267266
//
268267
////////////////////////////////////////////////////////////////////////////
269-
@Disabled
270268
@Test
271269
public void test_convertToNearestGap_columns() throws Exception {
272270
check_convertToNearestGap_column("4px", 5, "LABEL_COMPONENT_GAP_COLSPEC");
@@ -284,7 +282,6 @@ public void test_convertToNearestGap_columns() throws Exception {
284282
check_convertToNearestGap_column("20px", 5, null);
285283
}
286284

287-
@Disabled
288285
@Test
289286
public void test_convertToNearestGap_rows() throws Exception {
290287
check_convertToNearestGap_row("4px", 5, "LABEL_COMPONENT_GAP_ROWSPEC");

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/swing/model/layout/FormLayout/FormLayoutConverterTest.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2011 Google, Inc.
2+
* Copyright (c) 2011, 2025 Google, Inc. and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License 2.0 which is available at
@@ -18,7 +18,6 @@
1818

1919
import com.jgoodies.forms.layout.FormLayout;
2020

21-
import org.junit.jupiter.api.Disabled;
2221
import org.junit.jupiter.api.Test;
2322

2423
/**
@@ -60,7 +59,6 @@ public void test_empty() throws Exception {
6059
"}");
6160
}
6261

63-
@Disabled
6462
@Test
6563
public void test_oneRow() throws Exception {
6664
ContainerInfo panel =
@@ -118,7 +116,6 @@ public void test_oneRow() throws Exception {
118116
}
119117
}
120118

121-
@Disabled
122119
@Test
123120
public void test_twoRows_spanColumns() throws Exception {
124121
ContainerInfo panel =
@@ -181,7 +178,6 @@ public void test_twoRows_spanColumns() throws Exception {
181178
"}");
182179
}
183180

184-
@Disabled
185181
@Test
186182
public void test_Switching_fromGridBagLayout() throws Exception {
187183
ContainerInfo panel =

0 commit comments

Comments
 (0)