-
Notifications
You must be signed in to change notification settings - Fork 184
Convert Test_org_eclipse_swt_custom_BidiSegmentListener to use assertThrows instead of try-catch blocks #2580
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
Conversation
|
@copilot also look at preliminary work for a similar example by @akurtakov here #2579 |
Simplified the assertThrows usage following the pattern from PR #2579. The cleanup code is now outside the assertThrows lambda, making it cleaner and more straightforward (commit 582b0ab). Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Ensure text.removeBidiSegmentListener is always called by putting it in finally block |
|
@copilot please consider the remark from @akurtakov here #2580 (comment) |
Applied the suggestion - the listener cleanup is now in a finally block (commit 0bb8226).
Wrapped the test code in try-finally to ensure the listener is always removed, even if an exception or assertion failure occurs (commit 0bb8226). |
Co-authored-by: laeubi <[email protected]>
Co-authored-by: laeubi <[email protected]>
Co-authored-by: laeubi <[email protected]>
0bb8226 to
f5bd827
Compare
Test Results 108 files - 7 108 suites - 7 12m 59s ⏱️ -7s For more details on these errors, see this check. Results for commit f5bd827. ± Comparison against base commit ac18a18. This pull request removes 56 tests. |
|
Closing in favor of #2642 |
assertThrowsimport from JUnit JupitertestListenermethod to useassertThrowsinstead of try-catch when exception is expectedtestStyleRangeSegmentingmethod to remove unnecessary exception handlingOriginal prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.