summaryrefslogtreecommitdiff
path: root/dungeon/src/bsp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dungeon/src/bsp.rs')
-rw-r--r--dungeon/src/bsp.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/dungeon/src/bsp.rs b/dungeon/src/bsp.rs
index be0f282..4c72389 100644
--- a/dungeon/src/bsp.rs
+++ b/dungeon/src/bsp.rs
@@ -397,10 +397,11 @@ pub fn generate(seed: u64) -> (Box<[Tile; TILE_COUNT]>, Pos) {
(tiles_box, player_start)
}
-/// Tests
+/// BSP Unit Tests
#[cfg(test)]
mod tests {
use super::*;
+ use crate::map::MAP_SIZE;
#[test]
fn test_rect_center() {
@@ -469,7 +470,7 @@ mod tests {
let air_count = tiles.iter().filter(|&&t| t == Tile::Air).count();
assert!(air_count > 0);
// Check that player_start is within bounds
- assert!(player_start.xy().0 < MAP_SIZE_USIZE as u16);
- assert!(player_start.xy().1 < MAP_SIZE_USIZE as u16);
+ assert!(player_start.xy().0 < MAP_SIZE);
+ assert!(player_start.xy().1 < MAP_SIZE);
}
}