- Add roundtrip tests for all PlayerAction variants (Hoshe #6) - Add roundtrip tests for all EntityKind variants (Hoshe #6) - Add day wraparound at midnight edge case test (Hoshe #7) - Add day() calculation test (Hoshe #7) - Add out-of-order input rejection test (Hoshe #7) - Total: 15 → 20 tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
601 B
Rust
23 lines
601 B
Rust
//! Smoke test: the simulation world boots and can run a single tick.
|
|
|
|
use bevy_app::prelude::*;
|
|
use settled_reach_server::simulation::time::SimulationTime;
|
|
use settled_reach_server::simulation::SimulationPlugin;
|
|
|
|
#[test]
|
|
fn world_boots_and_ticks() {
|
|
let mut app = App::new();
|
|
app.add_plugins(SimulationPlugin);
|
|
|
|
// Verify initial state
|
|
let time = app.world().resource::<SimulationTime>();
|
|
assert_eq!(time.tick, 0);
|
|
|
|
// Run one update cycle
|
|
app.update();
|
|
|
|
// Verify tick advanced
|
|
let time = app.world().resource::<SimulationTime>();
|
|
assert_eq!(time.tick, 1);
|
|
}
|