-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add game and junit tests to AP #562
base: dev/1.19.2
Are you sure you want to change the base?
Conversation
…s to code test the most code which does not need a running minecraft instance. For other parts of the project, gametests will be created at a later point Also make a static helper function to create the tooltips to minimize duplication and maintenance time
# Conflicts: # gradle.properties
# Conflicts: # src/main/java/de/srendi/advancedperipherals/common/items/base/BaseBlockItem.java # src/main/java/de/srendi/advancedperipherals/common/items/base/BaseItem.java
…uters with CC's testing api Removed some old stuff
# Conflicts: # build.gradle
I will mark this as high priority. I will work on this asap since we really need tests for AP |
…om the CC repository and adapted it to our needs
I've implemented (copied) the needed stuff from the test source sets, but there is currently another issue with hamcrest and junit I need to work on |
…so they are included in the runtime when we run the tests
I fixed everything that need to be fixed (I think) |
src/testMod/java/de/srendi/advancedperipheralstest/TestGameTests.java
Outdated
Show resolved
Hide resolved
src/testMod/kotlin/dan200/computercraft/gametest/Computer_Test.kt
Outdated
Show resolved
Hide resolved
...ata/advancedperipheralstest/computer/tests/craftos_test.sends_basic_rednet_messages.echo.lua
Outdated
Show resolved
Hide resolved
…just a test, there is a bug loading the structures what I need to fix.
The test can be run via `runGameTestClient` using the /test command or `runGameTestServer` to run all the tests automatically
…od works correctly
Implement game tests for more peripherals
…l-tests Revert "Implement game tests for more peripherals"
…2-peripheral-tests Revert "Revert "Implement game tests for more peripherals""
…ure block. #BlameRS
… the 1.20.x branch This was mainly done to allow the execution of client tests
Backported changes from the CC: Tweaked Gametest framework present in 1.20.x
This PR aims to add the long needed game tests to AP. It's still a draft.
We will use the Testing Framework from CC to accomplish this
The framework is implemented, and I started to work on the first tests
ToDos:
getScanCooldown
method which currently does not exist in AP, so I cannot test it (the test currently uses the "internal"getOperationCooldown("scanBlocks")
method)isOnEnchantedSoil
function on Botania Mana Flowers always returns false, even when the flower is placed on enchanted soil. This seems to be the case because theovergrowth
variable on a Mana Flower is only set to true during the flower tick (see https://github.com/VazkiiMods/Botania/blob/1.20.x/Xplat/src/main/java/vazkii/botania/api/block_entity/SpecialFlowerBlockEntity.java#L100)isEmpty
method on Botania Mana Pools is currently missinggetBounding
method returning the coordinates of the block that the spreader is directed towards, shouldn't it be calledgetBinding
then?isEmpty
function on Botania Mana Spreaders does not return if the mana in the spreader is empty but if the item handler of the spreader is emptychangeNoteBy
is named somewhat weird. It sets the note value to the given parameter and does not change the note by x amount. Shouldn't it be calledsetNote
or something?