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

Port the Java, Lua and Minecraft tests #5

Closed
Jummit opened this issue May 21, 2021 · 8 comments
Closed

Port the Java, Lua and Minecraft tests #5

Jummit opened this issue May 21, 2021 · 8 comments

Comments

@Jummit
Copy link
Contributor

Jummit commented May 21, 2021

Testing can help catch regressions and confirm that features work how they should.

CC:T uses three testing frameworks; a custom-built Lua testing framework, JUnit and a framework based on Mojangs in-game testing framework using kotlin.

@SquidDev
Copy link
Member

FWIW, there's probably not much value in porting the Lua tests. dan200.computercraft.core has very little (hoping to get it down to none soon) Minecraft specific code so should be identical. That said, I guess it comes pretty naturally from porting the rest of the test suite.

framework based on Mojangs in-game testing framework using kotlin.

I'd like to imagine this is the most worthwhile porting, as it could also be used to test Fabric specific problems. Though I suspect it'll only really show its worth when updating between Minecraft versions.

@Merith-TK
Copy link
Collaborator

If you can successfully port these tests over, and confirm they merge, go ahead

FWIW, there's probably not much value in porting the Lua tests. dan200.computercraft.core has very little (hoping to get it down to none soon) Minecraft specific code so should be identical. That said, I guess it comes pretty naturally from porting the rest of the test suite.

framework based on Mojangs in-game testing framework using kotlin.

I'd like to imagine this is the most worthwhile porting, as it could also be used to test Fabric specific problems. Though I suspect it'll only really show its worth when updating between Minecraft versions.

lua tests could be helpful in finding fabric specific bugs with lua (as we have already seen via pushItems())

@Jummit
Copy link
Contributor Author

Jummit commented May 22, 2021

I thought about if the Lua tests should be ported, and decided that If we want tests, why not have them all. Maybe it'll catch some weird bug caused by changes we made to the fabric port.

@Merith-TK
Copy link
Collaborator

Have these been ported yet? I am unsure if they have completely been ported

@Jummit
Copy link
Contributor Author

Jummit commented Jun 11, 2021

Have these been ported yet? I am unsure if they have completely been ported

No, I ran into a few issues porting the Minecraft tests and have stopped working on it.

@SquidDev
Copy link
Member

No, I ran into a few issues porting the Minecraft tests and have stopped working on it.

Haha, the hacks I did to get them running on 1.16 D:.

@toad-dev
Copy link
Member

I think there's a fabric mod somewhere that reimplements some of mojangs stripped code so those structure tests are easier to set up. Mojang announced that code won't be stripped in 1.17 so maybe it's worth trying this again when we update.

@Merith-TK Merith-TK transferred this issue from Merith-TK/cc-restitched-unmaintained Oct 18, 2021
@Jummit
Copy link
Contributor Author

Jummit commented Dec 19, 2021

For future reference: Fabric recently added a game test API: FabricMC/fabric#1622
I'm not sure how it would fit into the Forge test suite though.

SquidDev added a commit that referenced this issue May 2, 2022
See #5. No gametests yet, those are more work.
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

No branches or pull requests

4 participants