isApplicable() determines if the play should start running
invariantHolds() determines if the play should continue running (isApplicable() was true earlier to start the play)
Currently, the isApplicable() and invariantHolds() functions of the play are untested. We had a lot of bugs because of this at Virtual Robocup. We need to implement a test for each.
That PR has been heavily commented to make it easier to follow along. You only need to add a couple comments to clarify what your testing, nothing more.
The createGameState function has been implemented to conviently create GameState from referee commands. You need to poke around software/world/game_state.cpp to figure out the right sequence of RefereeCommands. (You should already be slightly familiar with this file from the interview :))
Description of the task
isApplicable()
determines if the play should start runninginvariantHolds()
determines if the play should continue running (isApplicable()
was true earlier to start the play)Currently, the
isApplicable()
andinvariantHolds()
functions of the play are untested. We had a lot of bugs because of this at Virtual Robocup. We need to implement a test for each.Take a look at an example of how to do this for
HaltPlay
, the setup of the Play, World, GameState and ASSERT_TRUE/FALSE will be similar for your test: https://github.com/UBC-Thunderbots/Software/pull/2251/filesNOTE:
software/world/game_state.cpp
to figure out the right sequence of RefereeCommands. (You should already be slightly familiar with this file from the interview :))Acceptance criteria
isApplicable
andinvariantHolds
are correct: https://robocup-ssl.github.io/ssl-rules/sslrules.html (Rule Book)isApplicable
andinvariantHolds
Blocked By
N/A