Replaces the hardcoded seed=0 with the seed received in StartupMessage,
threading it through SimulationPlugin -> EconomyPlugin / SimRng. Integration
test fixtures updated for the new SimulationPlugin { seed } signature.
23 lines
613 B
Rust
23 lines
613 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 { seed: 0 });
|
|
|
|
// 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);
|
|
}
|