remove tests

This commit is contained in:
2026-03-20 10:52:46 +00:00
parent 792a8981c1
commit 9018dabd6b
2 changed files with 1 additions and 49 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
initial_chunk_radius = 7 initial_chunk_radius = 5
[spawn_counts] [spawn_counts]
dorfs = 5 dorfs = 5
-48
View File
@@ -298,51 +298,3 @@ impl ChunkData {
) )
} }
} }
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_index_roundtrip() {
for x in 0..CHUNK_SIZE {
for y in 0..CHUNK_SIZE {
for z in -(Z_BELOW as i32)..=(Z_ABOVE as i32) {
let idx = ChunkData::pos_to_index(x, y, z);
let (rx, ry, rz) = ChunkData::index_to_pos(idx);
assert_eq!((x, y, z), (rx, ry, rz), "Failed for ({}, {}, {})", x, y, z);
}
}
}
}
#[test]
fn test_bit_set_clear() {
let mut chunk = ChunkData::new(IVec2::new(0, 0));
// Set a tile at (2, 3, 1)
chunk.set_floor_tile(2, 3, 1, 42, true, true);
assert!(chunk.is_standable(2, 3, 1));
// Check that setting clears properly
chunk.set_floor_tile(2, 3, 1, 0, false, false);
// Need fixture or floor below to stand
assert!(!chunk.is_standable(2, 3, 1));
}
#[test]
fn test_standability_logic() {
let mut chunk = ChunkData::new(IVec2::new(0, 0));
// Set floor at z=1 that you can stand ON
chunk.set_floor_tile(0, 0, 1, 1, false, true);
// Set floor at z=2 that you can stand IN (air)
chunk.set_floor_tile(0, 0, 2, 0, true, false);
// Should be standable at z=2: in_air AND on_floor_below
assert!(chunk.is_standable(0, 0, 2));
}
}