diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/gametest/kotlin/moe/nea/firmament/gametest/GameTest.kt | 24 | ||||
| -rw-r--r-- | src/gametest/resources/fabric.mod.json | 14 | ||||
| -rw-r--r-- | src/test/kotlin/MixinTest.kt | 13 |
3 files changed, 39 insertions, 12 deletions
diff --git a/src/gametest/kotlin/moe/nea/firmament/gametest/GameTest.kt b/src/gametest/kotlin/moe/nea/firmament/gametest/GameTest.kt new file mode 100644 index 0000000..0ef0340 --- /dev/null +++ b/src/gametest/kotlin/moe/nea/firmament/gametest/GameTest.kt @@ -0,0 +1,24 @@ +package moe.nea.firmament.gametest + +import net.fabricmc.fabric.api.client.gametest.v1.FabricClientGameTest +import net.fabricmc.fabric.api.client.gametest.v1.context.ClientGameTestContext +import org.junit.jupiter.api.Assertions +import org.spongepowered.asm.mixin.MixinEnvironment +import moe.nea.firmament.init.MixinPlugin +import moe.nea.firmament.test.FirmTestBootstrap + +class GameTest : FabricClientGameTest { + override fun runTest(ctx: ClientGameTestContext) { + FirmTestBootstrap.bootstrapMinecraft() + MixinEnvironment.getCurrentEnvironment().audit() + val mp = MixinPlugin.instances.single() + Assertions.assertEquals( + mp.expectedFullPathMixins, + mp.appliedFullPathMixins, + ) + Assertions.assertNotEquals( + 0, + mp.mixins.size + ) + } +} diff --git a/src/gametest/resources/fabric.mod.json b/src/gametest/resources/fabric.mod.json new file mode 100644 index 0000000..fb1174d --- /dev/null +++ b/src/gametest/resources/fabric.mod.json @@ -0,0 +1,14 @@ +{ + "schemaVersion": 1, + "id": "firmament-gametest", + "version": "1.0.0", + "name": "Firmament Game Tests", + "environment": "*", + "entrypoints": { + "fabric-gametest": [ + ], + "fabric-client-gametest": [ + "moe.nea.firmament.gametest.GameTest" + ] + } +} diff --git a/src/test/kotlin/MixinTest.kt b/src/test/kotlin/MixinTest.kt index 55aa7c2..37d79c6 100644 --- a/src/test/kotlin/MixinTest.kt +++ b/src/test/kotlin/MixinTest.kt @@ -9,18 +9,7 @@ import moe.nea.firmament.init.MixinPlugin class MixinTest { @Test fun mixinAudit() { - FirmTestBootstrap.bootstrapMinecraft() - MixinEnvironment.getCurrentEnvironment().audit() - val mp = MixinPlugin.instances.single() - Assertions.assertEquals( - mp.expectedFullPathMixins, - mp.appliedFullPathMixins, - ) - Assertions.assertNotEquals( - 0, - mp.mixins.size - ) - + // Moved to GameTest } @Test |
