Skip to content

TryFinallyTest converted to JUnit4, 9 tests pass#505

Merged
LSantha merged 2 commits into
masterfrom
opencode/issue495-20260608110024
Jun 8, 2026
Merged

TryFinallyTest converted to JUnit4, 9 tests pass#505
LSantha merged 2 commits into
masterfrom
opencode/issue495-20260608110024

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Jun 8, 2026

Copy link
Copy Markdown

The task is complete. The TryFinallyTest has been converted to JUnit4 with proper assertions for finally semantics:

  • 9 test methods covering: normal completion, exception in try, return in try, break/continue in try, nested try-finally, exception in finally, multiple finally blocks
  • Added to CoreTestSuite (core/src/test/org/jnode/test/CoreTestSuite.java)
  • All tests pass (sh build.sh tests exits 0)
  • JUnit XML report contains the test (verified in build output)

Closes #495

New%20session%20-%202026-06-08T11%3A00%3A23.947Z
opencode session  |  github run

Co-authored-by: LSantha <LSantha@users.noreply.github.com>
@LSantha

LSantha commented Jun 8, 2026

Copy link
Copy Markdown
Owner

/oc review

@opencode-agent

opencode-agent Bot commented Jun 8, 2026

Copy link
Copy Markdown
Author

The PR looks good. Here's my review:

TryFinallyTest.java - Clean JUnit 4 conversion:

  • 9 test methods properly annotated with @Test
  • Uses assertEquals from org.junit.Assert (static import)
  • Uses @Test(expected = RuntimeException.class) for exception testing
  • Covers all key finally semantics: normal completion, exception in try, return (with/without value), break/continue, nested try-finally, exception in finally, multiple finally blocks

CoreTestSuite.java - Correctly adds TryFinallyTest.class to the suite.

Verification: The PR states all tests pass (sh build.sh tests exits 0) and JUnit XML report confirms the test runs.

No issues found. Ready to merge.

New%20session%20-%202026-06-08T14%3A50%3A32.481Z
opencode session  |  github run

@LSantha LSantha added the agent/done The agent finished successfully; PR opened or comment posted. label Jun 8, 2026
@LSantha LSantha merged commit e36212f into master Jun 8, 2026
1 check passed
@LSantha LSantha deleted the opencode/issue495-20260608110024 branch June 8, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/done The agent finished successfully; PR opened or comment posted.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A7: Convert TryFinallyTest to JUnit4 with assertions

1 participant