Repository navigation
Move the builder checks to JUnit - #84
Merged
Merged
Conversation
The 16 builderTest programs (17 classes with GuiProtocolTest) move to src/test and run under ./gradlew test, so one run reports every failing check instead of stopping at the first failed task. - Each main becomes a @test method; BlockEntitiesTest.standaloneMachine and GuiProtocolTest (called from ScreenLoaderTest) become tests of their own. The check bodies are unchanged apart from dropping the "passed" prints. - The builderTest source set and its 16 verify* JavaExec tasks are gone; the test task sets mmdlib.resources and mmdlib.generated for VanillaExamplesTest and RuntimeBehaviorTest. - Docs that named the old tasks now name the test classes, and the CI comment and build.gradle no longer mention them. The checks passed in one JVM with classes and methods in four random orders (they used to run in separate JVMs). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo
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.
What this is
The last PR of the machine module stack, after #81, #82 and #83. It finishes the move to JUnit that #82 started, and only touches tests, build scripts and docs. Nothing under
src/mainchanges.The 16 remaining
src/builderTestprograms (17 classes withGuiProtocolTest) move tosrc/testand run under./gradlew test. One run now reports every failing check, instead of stopping at the first failed task.mainbecomes a@Testmethod.BlockEntitiesTest.standaloneMachineandGuiProtocolTest(called fromScreenLoaderTest) become tests of their own. The check bodies are unchanged apart from dropping the "passed" prints.builderTestsource set and its 16verify*JavaExectasks are gone. Thetesttask setsmmdlib.resourcesandmmdlib.generatedforVanillaExamplesTestandRuntimeBehaviorTest.build.gradleno longer mention them.Review notes
@Testthat stops at its first failed check, because I moved them as they were. Failures across classes are all reported now, but a class still stops at its first. I'd split them up when they next change, rather than in this PR.buildstill doesn't run any of this, as on Test infrastructure: JUnit 5, game tests and CI #82. It's all on./gradlew check.Testing
./gradlew checkpasses locally: 70 unit tests with no failures, and all 18 game tests.checkgot a little faster, because 16 forked JVMs became one: 1m 7s down to 52s, and 55 tasks down to 38. That's one local--rerun-tasksrun each, so treat it as a rough figure.🤖 Generated with Claude Code
https://claude.ai/code/session_018zpP6ZrFjaGe477FvWAZKo