()
| 329 | |
| 330 | #[test] |
| 331 | fn envelope_polygon() { |
| 332 | let poly = Geometry::polygon(vec![vec![[1.0, 2.0], [5.0, 2.0], [3.0, 8.0], [1.0, 2.0]]]); |
| 333 | let env = st_envelope(&poly); |
| 334 | if let Geometry::Polygon { coordinates } = &env { |
| 335 | let ring = &coordinates[0]; |
| 336 | assert_eq!(ring[0], [1.0, 2.0]); // min_lng, min_lat |
| 337 | assert_eq!(ring[2], [5.0, 8.0]); // max_lng, max_lat |
| 338 | } else { |
| 339 | panic!("expected Polygon"); |
| 340 | } |
| 341 | } |
| 342 | |
| 343 | #[test] |
| 344 | fn envelope_point() { |
nothing calls this directly
no test coverage detected