itest: drop 52 JUnit 4-era dummyTest() methods#7642
Open
Vest wants to merge 1 commit into
Open
Conversation
Every concrete `*IntegrationTest` class under
`code/src/itest/plugin/lsttokens/editcontext/**` carried an empty
@test
public void dummyTest()
{
// Just to get Eclipse to recognize this as a JUnit 4.0 Test Case
}
Modern Eclipse + JUnit 5 recognise these classes via their inherited
`@Test` methods on the `Abstract*IntegrationTestCase` parents (each
parent declares 5–18 real tests). The dummies have not been needed for
years; each one padded the report by one passing test that asserted
nothing.
Verified end-to-end:
- `./gradlew compileItestJava` clean.
- `./gradlew itest --tests KitIntegrationTest` → 18 tests, 0 failures
(was 19 with the dummy; the 18 inherited real tests still run).
- `FactIntegrationTest` and `FactSetIntegrationTest` (which extend the
scaffold-only `AbstractIntegrationTestCase` and therefore inherit no
tests) keep their 7 own real `@Test` methods — verified running.
Also drops the now-unused `import org.junit.jupiter.api.Test;` from the
40 files where `dummyTest` was the only local `@Test` usage. The 12
files with additional local `@Test` methods keep the import.
Pure cleanup — no production code touched, no test coverage lost.
Contributor
Author
|
This PR exists, because I am against of useless tests :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every concrete
*IntegrationTestclass undercode/src/itest/plugin/lsttokens/editcontext/**carried an emptyModern Eclipse + JUnit 5 recognise these classes via their inherited
@Testmethods on theAbstract*IntegrationTestCaseparents (each parent declares 5–18 real tests). The dummies have not been needed for years; each one padded the report by one passing test that asserted nothing.Verification
./gradlew compileItestJava— clean../gradlew itest --tests "plugin.lsttokens.editcontext.KitIntegrationTest"— 18 tests, 0 failures, 0 skipped (was 19 with the dummy; the 18 inherited real tests still run).FactIntegrationTestandFactSetIntegrationTestextend the scaffold-onlyAbstractIntegrationTestCaseand therefore inherit no tests — they keep their 7 own real@Testmethods each, verified running.grep -rln "dummyTest" code/src/itestreturns nothing.Import cleanup
Also drops the now-unused
import org.junit.jupiter.api.Test;from the 40 files wheredummyTestwas the only local@Testusage. The 12 files with additional local@Testmethods keep the import.Stats
Pure cleanup — no production code touched, no test coverage lost.