Server boilerplate epic (276) complete. Establishes the Rust simulation server foundation per D-020 (subprocess/IPC architecture). Structure: - bevy_ecs 0.18 + bevy_app 0.18, MessagePack serialization (rmp-serde) - SimulationPlugin with deterministic resources: SimulationTime (D-031), SimRng (D-030), InputQueue (D-010) - Core IPC types: ObserverSnapshot, PlayerInput, SimBridge trait (D-020) - CauseChain production component for provenance tracking (D-030) - SimulationTier types with LRU eviction support (D-026) - NPC 10-axis model components (D-024) - 15 tests: inline unit tests + integration smoke/serialization tests - make ci-server passes (clippy, fmt, build, test) 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::SimulationPlugin;
|
|
use settled_reach_server::simulation::time::SimulationTime;
|
|
|
|
#[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);
|
|
}
|