Skip to content

Migrate org.eclipse.ui.workbench.texteditor.tests off JUnit 4 - #4228

Merged
akurtakov merged 1 commit into
eclipse-platform:masterfrom
vogella:migrate-texteditor-tests-junit5
Aug 6, 2026
Merged

Migrate org.eclipse.ui.workbench.texteditor.tests off JUnit 4#4228
akurtakov merged 1 commit into
eclipse-platform:masterfrom
vogella:migrate-texteditor-tests-junit5

Conversation

@vogella

@vogella vogella commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This bundle was already almost entirely on JUnit Jupiter. Only three helper classes still statically imported org.junit.Assert, so they are switched over to org.junit.jupiter.api.Assertions. One assertFalse call passes a message, so its argument order is flipped to match the Jupiter signature.

With the last JUnit 4 usage gone, the org.junit Require-Bundle entry can go too. That bundle also supplied Hamcrest transitively, so org.hamcrest is now declared explicitly in Import-Package, which makes the real dependency visible instead of relying on a side effect of the JUnit 4 dependency.

The bundle now has a single test framework rather than a mix, and one fewer bundle on its classpath. All 222 tests pass locally.

The bundle already used JUnit Jupiter everywhere except three helper
classes that still statically imported org.junit.Assert. Switch those to
org.junit.jupiter.api.Assertions, adjusting the argument order of the
assertFalse call that passes a message.

With the last JUnit 4 usage gone, drop the org.junit Require-Bundle. That
bundle also pulled in Hamcrest transitively, so declare the org.hamcrest
package explicitly in Import-Package instead.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Test Results

   858 files  ±0     858 suites  ±0   50m 47s ⏱️ + 1m 45s
 8 129 tests ±0   7 886 ✅ ±0  243 💤 ±0  0 ❌ ±0 
20 289 runs  ±0  19 635 ✅ ±0  654 💤 ±0  0 ❌ ±0 

Results for commit 04ca5f8. ± Comparison against base commit 3b87cba.

@akurtakov
akurtakov merged commit f78bd54 into eclipse-platform:master Aug 6, 2026
18 checks passed
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.

2 participants