Skip to content

Commit

Permalink
style: update test to use tryfrom
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsier committed Dec 22, 2024
1 parent c7cc0c7 commit a22f109
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ mod tests {
use std::collections::HashMap;

#[test]
fn test_quick_collection() {
fn test_try_from_collection() {
let k = KmlDocument {
elements: vec![
Kml::Point(Point::from(Coord::from((1., 1.)))),
Expand All @@ -448,6 +448,9 @@ mod tests {
geo_types::Geometry::LineString(geo_types::LineString::from(vec![(1., 1.), (2., 2.)])),
geo_types::Geometry::Point(geo_types::Point::from((3., 3.))),
]);
assert_eq!(quick_collection(Kml::KmlDocument(k)).unwrap(), gc);
assert_eq!(
geo_types::GeometryCollection::try_from(Kml::KmlDocument(k)).unwrap(),
gc
);
}
}

0 comments on commit a22f109

Please sign in to comment.