Skip to content

Replace CSSSWTTestCase inheritance with a JUnit 5 extension#4162

Open
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:css-swt-test-extension
Open

Replace CSSSWTTestCase inheritance with a JUnit 5 extension#4162
vogella wants to merge 1 commit into
eclipse-platform:masterfrom
vogella:css-swt-test-extension

Conversation

@vogella

@vogella vogella commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

The widget tests in org.eclipse.e4.ui.tests.css.swt all had to extend CSSSWTTestCase to get a Display, engine creation and shell cleanup, and they shared its protected mutable display field. This replaces the base class with a CssSwtEngine extension registered via @RegisterExtension: the extension owns the engine and widget helpers, exposes the display and engine through accessors, and disposes open shells after each test. The tests keep their exact behavior (the full suite passes with the same totals as before) and are now free to extend other bases.

Part of #3980.

The css.swt widget tests inherited Display and engine handling plus a
protected mutable display field from a common base class, which tied
every test to that superclass. A CssSwtEngine extension registered via
RegisterExtension now owns engine creation, the widget helpers and
shell cleanup; tests access the display and engine through accessors
and are free to extend other bases.
vogella added a commit to vogella/eclipse.platform.ui that referenced this pull request Jul 4, 2026
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Test Results

   855 files  ±0     855 suites  ±0   50m 48s ⏱️ +41s
 8 102 tests ±0   7 859 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 208 runs  ±0  19 554 ✅ ±0  654 💤 ±0  0 ❌ ±0 

Results for commit b9baa01. ± Comparison against base commit 68e20f6.

@vogella vogella marked this pull request as ready for review July 4, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant