[Unit Tests] Create unit tests for GameState
Feature Request
Summary
Create unit tests for the GameState class to validate referee updates, world‐state updates, score tracking, and orientation flags.
Acceptance Criteria
-
Add GameStateTest.cppunderunit_tests. -
Test updateRefereeState(refData)changes internalgameStateandgetRefereeData(). -
Test updateWorldState(ballData, friendlyTeam)setsisBlueOnPositive()flag and updatesball. -
Test getBlueScore()/getYellowScore()after sequential calls. -
Test isBlueOnPositive()toggles based on input. -
Test getRefereeState()reflects last referee command. -
All tests compile under Ninja and pass via ./build/unit_tests.
Design / Technical Approach
- Include
GameState.h, stubRefereeData. - Feed sample referee data, assert state changes.
- Feed world‐state updates, assert orientation and scores.
Dependencies
-
GameState.h,RefereeData.h,BallData. - Boost.UT framework.
Testing Plan
- Build:
ninja - Run:
./build/unit_tests --run_test GameState