Run Tests
Builds the project (if needed) and runs all tests using CTest.
Instructions
- •
Run tests:
bashmake test
- •
Run tests with coverage:
bashmake test-coverage
Test Structure
Tests are organized into modular suites:
- •
PlayerMovement- Player movement and bounds tests - •
NetworkProtocol- Network serialization/deserialization tests - •
EventBus- Event bus pub/sub tests - •
InputSystem- Input handling tests - •
RemotePlayerInterpolation- Remote player interpolation tests - •
ClientPrediction- Client-side prediction tests
Expected Output
On success, you should see:
code
100% tests passed, 0 tests failed out of 6
On failure, CTest will show which test suites failed with error details.
Notes
- •Tests use CTest for better isolation and parallel execution
- •Each test suite is a separate executable in
build/test_* - •Run specific tests with:
cd build && ctest -R <TestName> - •Run tests in parallel with:
cd build && ctest -j8 - •Coverage reports available at
build/coverage/index.html