Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate win32 unit tests to JUnit 5 and reduce test visibility #1298 #1305

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

HeikoKlare
Copy link
Contributor

@HeikoKlare HeikoKlare commented Jun 26, 2024

This migrates the unit tests placed in the SWT win32 production fragments to JUnit 5. The visibility of the test classes is reduced to packaged protected as allowed by JUnit 5.

This resolves the API errors as reported in #1298.

Fixes #1298

…e-platform#1298

This migrates the unit tests placed in the SWT win32 production
fragments to JUnit 5. The visibility of the test classes is reduced to
`packaged protected` as allowed by JUnit 5.

Fixes eclipse-platform#1298
Copy link
Contributor

Test Results

   470 files  ±0     470 suites  ±0   7m 59s ⏱️ - 1m 10s
 4 135 tests ±0   4 127 ✅ ±0   8 💤 ±0  0 ❌ ±0 
16 336 runs  ±0  16 244 ✅ ±0  92 💤 ±0  0 ❌ ±0 

Results for commit 36cab26. ± Comparison against base commit f40502d.

@HeikoKlare HeikoKlare marked this pull request as ready for review June 26, 2024 07:07
@HeikoKlare HeikoKlare requested a review from niraj-modi as a code owner June 26, 2024 07:07
@vogella
Copy link
Contributor

vogella commented Jun 26, 2024

LGTM

@HeikoKlare
Copy link
Contributor Author

Tests are still properly executed, even with reduced test class visibility after JUnit 5 migration:

[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.422 s -- in org.eclipse.swt.graphics.GCWin32Tests
[INFO] Running org.eclipse.swt.graphics.PathWin32Tests
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 s -- in org.eclipse.swt.graphics.PathWin32Tests
[INFO] Running org.eclipse.swt.graphics.TextLayoutWin32Tests
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 s -- in org.eclipse.swt.graphics.TextLayoutWin32Tests
[INFO] Running org.eclipse.swt.graphics.TransformWin32Tests
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s -- in org.eclipse.swt.graphics.TransformWin32Tests
[INFO] Running org.eclipse.swt.internal.DefaultSWTFontRegistryTests
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 s -- in org.eclipse.swt.internal.DefaultSWTFontRegistryTests
[INFO] Running org.eclipse.swt.internal.ScalingSWTFontRegistryTests
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 s -- in org.eclipse.swt.internal.ScalingSWTFontRegistryTests
[INFO] Running org.eclipse.swt.widgets.ControlWin32Tests
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 s -- in org.eclipse.swt.widgets.ControlWin32Tests
[INFO] Running org.eclipse.swt.widgets.WidgetWin32Tests
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.078 s -- in org.eclipse.swt.widgets.WidgetWin32Tests

@HeikoKlare
Copy link
Contributor Author

@merks are you fine with merging this as it subsumes your proposal #1303?

@merks
Copy link
Contributor

merks commented Jun 26, 2024

@HeikoKlare

Of course that's fine. I only created the other PR because I already had it in my workspace for testing the effect.

@HeikoKlare HeikoKlare merged commit e386c7a into eclipse-platform:master Jun 26, 2024
14 checks passed
@HeikoKlare HeikoKlare deleted the issue-1298 branch June 26, 2024 11:34
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.

SWT tests for win32 have API errors
3 participants