Test for overflow
This commit is contained in:
parent
b9d633eb52
commit
f65a5f3c6e
14
src/map.rs
14
src/map.rs
|
@ -335,4 +335,18 @@ mod tests {
|
||||||
|
|
||||||
assert_eq!(map.tiles, expected_map.tiles);
|
assert_eq!(map.tiles, expected_map.tiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_available_exists() {
|
||||||
|
let map_str = "
|
||||||
|
#########
|
||||||
|
# # #
|
||||||
|
##########
|
||||||
|
";
|
||||||
|
let map = Map::from_string(map_str);
|
||||||
|
let exists = map.get_available_exits(0, 0);
|
||||||
|
|
||||||
|
assert_eq!(exists.len(), 0);
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user