test(simulation): QA coverage for Phase 2 verbs, sprint suppression, occupancy, inventory
Add comprehensive test suites across sprint 6 systems: - Phase 2 observer filter: Confront injection, archetype label relabeling, contradiction marking, POI priority ordering (12 tests) - Sprint anomaly: detection during sprint, queue semantics, delay timing, D-055 visible-but-suppressed integration (7 tests) - Wire format: Confront and CharacterArchetype msgpack roundtrip (4 tests) - TilePresence: 4-layer coexistence on same tile (1 test) - Inventory: Take/Place full roundtrip, capacity enforcement (3 tests) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -857,4 +857,50 @@ mod tests {
|
||||
"two Fixtures on same tile should collide"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn all_four_layers_coexist_on_same_tile() {
|
||||
// D-054: Standing + Prone + Seated + Fixture all share one tile
|
||||
let mut world = bevy_ecs::world::World::new();
|
||||
world.insert_resource(WalkabilityMap::new(10, 10, 1));
|
||||
|
||||
let target = TilePosition::new(5, 4, 0);
|
||||
|
||||
// Fixture and Prone already at tile
|
||||
world.spawn((target, TilePresence::Fixture));
|
||||
world.spawn((target, TilePresence::Prone));
|
||||
|
||||
// Standing mover enters
|
||||
let standing = world
|
||||
.spawn((
|
||||
TilePosition::new(5, 5, 0),
|
||||
TilePresence::Standing,
|
||||
MoveIntent { target },
|
||||
))
|
||||
.id();
|
||||
|
||||
// Seated mover enters from elsewhere
|
||||
let seated = world
|
||||
.spawn((
|
||||
TilePosition::new(5, 3, 0),
|
||||
TilePresence::Seated,
|
||||
MoveIntent { target },
|
||||
))
|
||||
.id();
|
||||
|
||||
let mut schedule = bevy_ecs::schedule::Schedule::default();
|
||||
schedule.add_systems(validate_movement);
|
||||
schedule.run(&mut world);
|
||||
|
||||
assert_eq!(
|
||||
*world.get::<TilePosition>(standing).unwrap(),
|
||||
target,
|
||||
"Standing should share tile with Fixture + Prone"
|
||||
);
|
||||
assert_eq!(
|
||||
*world.get::<TilePosition>(seated).unwrap(),
|
||||
target,
|
||||
"Seated should share tile with Fixture + Prone + Standing"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user