()
| 2423 | |
| 2424 | #[test] |
| 2425 | fn test_all_locations_within() { |
| 2426 | let world = GameWorld::test_world(); |
| 2427 | let loc = MapLocation::new(Planet::Earth, 2, 4); |
| 2428 | let locs = world.all_locations_within(loc, 16); |
| 2429 | assert_eq!(locs.len(), 43, "43 locations within 16 distance squared"); |
| 2430 | for new_loc in locs { |
| 2431 | assert_lte!(loc.distance_squared_to(new_loc), 16); |
| 2432 | } |
| 2433 | assert_eq!(world.all_locations_within(loc, 0), vec![loc]); |
| 2434 | } |
| 2435 | |
| 2436 | #[test] |
| 2437 | fn test_end_turn_trivial() { |
nothing calls this directly
no test coverage detected