From f65a5f3c6e361f5a3481da2cc214e4696f9f580f Mon Sep 17 00:00:00 2001 From: klangner Date: Thu, 26 Aug 2021 17:11:14 +0200 Subject: [PATCH] Test for overflow --- src/map.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/map.rs b/src/map.rs index e89fc63..c0c6f3c 100644 --- a/src/map.rs +++ b/src/map.rs @@ -335,4 +335,18 @@ mod tests { 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); + } } \ No newline at end of file