CC: Restitched

CC: Restitched

3M Downloads

Port the Java, Lua and Minecraft tests

Jummit opened this issue ยท 8 comments

commented

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.

commented

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.

commented

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.

commented

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())

commented

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.

commented

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

commented

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.

commented

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:.

commented

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.