Skip to content
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

25w03a game tests #4385

Merged
merged 7 commits into from
Jan 21, 2025
Merged

25w03a game tests #4385

merged 7 commits into from
Jan 21, 2025

Conversation

modmuss50
Copy link
Member

@modmuss50 modmuss50 commented Jan 17, 2025

Tottaly overhalled Game Test module to accomdate the changes made in 25w03a.

I have added back a @GameTest that functions almost the same as the previous one vanilla had. The new vanilla system makes it much harder to write a test than it was before. As there was a lot of value in the magic annotation and tests that are easy to write I think it makes sense to have something similar to what we had before.

The options in the new Fabric provided @GameTest annotation directly map the vanilla data driven options, removing the need to have a json file for each test function. Data driven tests will still work if you wish to use the vanilla system.

The previous fabric-api.gametest and fabric-api.gametest.report-file system properties work as they did before. fabric-api.gametest.filter and fabric-api.gametest.verify have been added that map directly to the vanilla gametest entrypoint options.

Tests can still be ran/debuged from within a client using the /test command. Structures can still be loaded from snbt files as before.

@modmuss50 modmuss50 added port Porting existing code to a different version test priority:high High priority PRs that need review and work now. Review these first. labels Jan 17, 2025
@modmuss50 modmuss50 marked this pull request as ready for review January 17, 2025 18:53
…gametest/TestAnnotationLocator.java

Co-authored-by: Joseph Burton <[email protected]>
Copy link
Contributor

@haykam821 haykam821 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many tests get broken by the change from a 8x8x8 empty structure template to the vanilla 1x1x1 one.

@modmuss50 modmuss50 requested a review from haykam821 January 20, 2025 13:21
@modmuss50 modmuss50 added the merge me please Pull requests that are ready to merge label Jan 21, 2025
@modmuss50 modmuss50 merged commit 73a52b4 into FabricMC:1.21.5 Jan 21, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me please Pull requests that are ready to merge port Porting existing code to a different version priority:high High priority PRs that need review and work now. Review these first. test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants