Skip to content

Conversation

@wlsnmrk
Copy link
Contributor

@wlsnmrk wlsnmrk commented Dec 1, 2025

Fixes #197.

When a [Failure] method exists in the test suite, failing tests are now only marked failed. The test executor now correctly reports passed/failed status for the [Failure] method when executing it, instead of the test method that triggered the failure.

Previously, failing tests in a suite with a [Failure] method were marked passed after being marked failed, and status for the [Failure] method was not reported.

Since the methods run from a suite depend on the TestOp type, make
TestOp responsible for knowing which methods to run, instead of using
pattern-matching on the type. Avoids bugs if more TestOp types are added
in future and supports mocking TestOp in tests, as well.
Added a test to verify that failing [Test] methods are not marked Passed
when a [Failure] method exists in the suite. This test is currently
failing.
When a [Failure] method exists in the test suite, failing methods are
only marked failed. The test executor correctly reports passed/failed
status for the [Failure] method when executing it, instead of the test
method that triggered the failure.

Previously, failing methods in a suite with a [Failure] method were
marked passed after being marked failed, and status for the [Failure]
method was not reported.
@wlsnmrk wlsnmrk requested a review from jolexxa December 1, 2025 17:12
@wlsnmrk wlsnmrk merged commit f7de322 into chickensoft-games:main Dec 1, 2025
4 checks passed
@wlsnmrk wlsnmrk deleted the fix/schrodingers-test branch December 1, 2025 17:18
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.

marking a method with the Failure attribute in a TestClass causes failed tests to count as both passed and failed.

2 participants