-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Added Unit test #5303
Added Unit test #5303
Conversation
Chefk initial items test case updated
@@ -21,7 21,7 @@ | |||
import mindustry.type.*; | |||
import mindustry.world.*; | |||
import org.junit.jupiter.api.*; | |||
|
|||
import mindustry.editor.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this import used for?
@@ -136,6 136,40 @@ void spawnWaves(){ | |||
assertFalse(Groups.unit.isEmpty(), "No enemies spawned."); | |||
} | |||
|
|||
@Test | |||
void checkInitialItems() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really see the purpose of this test. It may not always be the case that every map has 200 copper as a starting item, and some maps may not have any starting items at all. If I ever increase the starting copper amount to 300 copper, this test will break.
} | ||
|
||
@Test | ||
void TeamsStatusTest() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spurious
void TeamsStatusTest() { | |
void TeamsStatusTest(){ |
@@ -235,6 269,8 @@ void load(){ | |||
assertTrue(state.teams.playerCores().size > 0); | |||
} | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary extra lines
@@ -268,6 304,8 @@ void liquidOutput(){ | |||
assertTrue(world.tile(2, 1).build.liquids.current() == Liquids.water); | |||
} | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary extra lines
we fixed the issues you mentioned and send a new commit |
Added three test cases testing the logic of the game.