1
1
/*******************************************************************************
2
- * Copyright (c) 2000, 2022 IBM Corporation and others.
2
+ * Copyright (c) 2000, 2025 IBM Corporation and others.
3
3
*
4
4
* This program and the accompanying materials
5
5
* are made available under the terms of the Eclipse Public License 2.0
18
18
import java .util .List ;
19
19
20
20
import org .eclipse .swt .graphics .Resource ;
21
- import org .junit .AfterClass ;
22
- import org .junit .BeforeClass ;
23
- import org .junit .runner .JUnitCore ;
24
- import org .junit .runner .RunWith ;
25
- import org .junit .runners .Suite ;
21
+ import org .junit .jupiter .api .AfterAll ;
22
+ import org .junit .jupiter .api .BeforeAll ;
23
+ import org .junit .platform .suite .api .SelectClasses ;
24
+ import org .junit .platform .suite .api .Suite ;
26
25
27
26
/**
28
27
* Suite for running most SWT test cases (all except for browser tests).
29
28
*/
30
- @ RunWith ( Suite . class )
31
- @ Suite . SuiteClasses ({ Test_org_eclipse_swt_SWT .class , Test_org_eclipse_swt_SWTException .class ,
29
+ @ Suite
30
+ @ SelectClasses ({ Test_org_eclipse_swt_SWT .class , Test_org_eclipse_swt_SWTException .class ,
32
31
Test_org_eclipse_swt_SWTError .class , Test_org_eclipse_swt_widgets_Display .class , AllGraphicsTests .class ,
33
32
AllWidgetTests .class , Test_org_eclipse_swt_layout_GridData .class ,
34
33
Test_org_eclipse_swt_events_ControlEvent .class , Test_org_eclipse_swt_events_ModifyEvent .class ,
50
49
public class AllNonBrowserTests {
51
50
private static List <Error > leakedResources ;
52
51
53
- @ BeforeClass
52
+ @ BeforeAll
54
53
public static void beforeClass () {
55
54
// Set up ResourceTracked to detect any leaks
56
55
leakedResources = new ArrayList <> ();
@@ -67,7 +66,7 @@ public static void beforeClass() {
67
66
* through a test and not through @AfterClass, but this is a
68
67
* suite class and not a test class, so it can't have tests.
69
68
*/
70
- @ AfterClass
69
+ @ AfterAll
71
70
public static void afterClass () {
72
71
// Run GC in order do detect any outstanding leaks
73
72
System .gc ();
@@ -93,10 +92,6 @@ public static void afterClass() {
93
92
}
94
93
}
95
94
96
- public static void main (String [] args ) {
97
- JUnitCore .main (AllNonBrowserTests .class .getName ());
98
- }
99
-
100
95
/*
101
96
* The logical order to run the tests in is: - SWT, SWTError, SWTException -
102
97
* Display - graphics classes - items and Caret, etc - widgets - dialogs -
0 commit comments