From ab18f1744c5f6a9d561a6e4d7203334385e9657c Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Tue, 31 Oct 2023 22:42:34 -0400 Subject: [PATCH] Restore commented tests (#213) --- src/array/linestring/array.rs | 2 -- src/array/multilinestring/array.rs | 3 --- src/array/multipoint/array.rs | 2 -- src/array/multipolygon/array.rs | 2 -- src/array/polygon/array.rs | 2 -- src/io/geos/array/linestring.rs | 3 +-- src/io/geos/array/multilinestring.rs | 3 +-- src/io/geos/array/multipoint.rs | 3 +-- src/io/geos/array/multipolygon.rs | 3 +-- src/io/geos/array/polygon.rs | 3 +-- src/io/wkb/writer/linestring.rs | 3 +-- src/io/wkb/writer/multilinestring.rs | 3 +-- src/io/wkb/writer/multipoint.rs | 3 +-- src/io/wkb/writer/multipolygon.rs | 3 +-- src/io/wkb/writer/polygon.rs | 3 +-- 15 files changed, 10 insertions(+), 31 deletions(-) diff --git a/src/array/linestring/array.rs b/src/array/linestring/array.rs index daa25a7a..b3bd13e2 100644 --- a/src/array/linestring/array.rs +++ b/src/array/linestring/array.rs @@ -492,7 +492,6 @@ mod test { } #[test] - #[allow(unused_variables)] fn parse_wkb_geoarrow_interleaved_example() { let linestring_arr = example_linestring_interleaved(); @@ -503,7 +502,6 @@ mod test { } #[test] - #[allow(unused_variables)] fn parse_wkb_geoarrow_separated_example() { let linestring_arr = example_linestring_separated().into_coord_type(CoordType::Interleaved); diff --git a/src/array/multilinestring/array.rs b/src/array/multilinestring/array.rs index a62f6b99..0ad56478 100644 --- a/src/array/multilinestring/array.rs +++ b/src/array/multilinestring/array.rs @@ -573,7 +573,6 @@ mod test { } #[test] - #[allow(unused_variables)] fn parse_wkb_geoarrow_interleaved_example() { let geom_arr = example_multilinestring_interleaved(); @@ -584,9 +583,7 @@ mod test { } #[test] - #[allow(unused_variables)] fn parse_wkb_geoarrow_separated_example() { - // TODO: support checking equality of interleaved vs separated coords let geom_arr = example_multilinestring_separated().into_coord_type(CoordType::Interleaved); let wkb_arr = example_multilinestring_wkb(); diff --git a/src/array/multipoint/array.rs b/src/array/multipoint/array.rs index c63aa0eb..81d860d6 100644 --- a/src/array/multipoint/array.rs +++ b/src/array/multipoint/array.rs @@ -492,7 +492,6 @@ mod test { } #[test] - #[allow(unused_variables)] fn parse_wkb_geoarrow_interleaved_example() { let geom_arr = example_multipoint_interleaved(); @@ -503,7 +502,6 @@ mod test { } #[test] - #[allow(unused_variables)] fn parse_wkb_geoarrow_separated_example() { // TODO: support checking equality of interleaved vs separated coords let geom_arr = example_multipoint_separated().into_coord_type(CoordType::Interleaved); diff --git a/src/array/multipolygon/array.rs b/src/array/multipolygon/array.rs index c983978b..4d3ab5a2 100644 --- a/src/array/multipolygon/array.rs +++ b/src/array/multipolygon/array.rs @@ -634,7 +634,6 @@ mod test { } #[test] - #[allow(unused_variables)] fn parse_wkb_geoarrow_interleaved_example() { let geom_arr = example_multipolygon_interleaved(); @@ -645,7 +644,6 @@ mod test { } #[test] - #[allow(unused_variables)] fn parse_wkb_geoarrow_separated_example() { // TODO: support checking equality of interleaved vs separated coords let geom_arr = example_multipolygon_separated().into_coord_type(CoordType::Interleaved); diff --git a/src/array/polygon/array.rs b/src/array/polygon/array.rs index 95640816..d7028833 100644 --- a/src/array/polygon/array.rs +++ b/src/array/polygon/array.rs @@ -545,7 +545,6 @@ mod test { } #[test] - #[allow(unused_variables)] fn parse_wkb_geoarrow_interleaved_example() { let geom_arr = example_polygon_interleaved(); @@ -556,7 +555,6 @@ mod test { } #[test] - #[allow(unused_variables)] fn parse_wkb_geoarrow_separated_example() { // TODO: support checking equality of interleaved vs separated coords let geom_arr = example_polygon_separated().into_coord_type(CoordType::Interleaved); diff --git a/src/io/geos/array/linestring.rs b/src/io/geos/array/linestring.rs index caa1632d..350c2c69 100644 --- a/src/io/geos/array/linestring.rs +++ b/src/io/geos/array/linestring.rs @@ -44,11 +44,10 @@ mod test { use crate::test::linestring::ls_array; #[test] - #[allow(unused_variables)] fn geos_round_trip() { let arr = ls_array(); let geos_geoms: Vec> = arr.iter_geos().collect(); let round_trip: LineStringArray = geos_geoms.try_into().unwrap(); - // assert_eq!(arr, round_trip); + assert_eq!(arr, round_trip); } } diff --git a/src/io/geos/array/multilinestring.rs b/src/io/geos/array/multilinestring.rs index a4ed7ba4..ed33012b 100644 --- a/src/io/geos/array/multilinestring.rs +++ b/src/io/geos/array/multilinestring.rs @@ -160,11 +160,10 @@ mod test { use crate::test::multilinestring::ml_array; #[test] - #[allow(unused_variables)] fn geos_round_trip() { let arr = ml_array(); let geos_geoms: Vec> = arr.iter_geos().collect(); let round_trip: MultiLineStringArray = geos_geoms.try_into().unwrap(); - // assert_eq!(arr, round_trip); + assert_eq!(arr, round_trip); } } diff --git a/src/io/geos/array/multipoint.rs b/src/io/geos/array/multipoint.rs index 822b262b..b99e8ab1 100644 --- a/src/io/geos/array/multipoint.rs +++ b/src/io/geos/array/multipoint.rs @@ -92,11 +92,10 @@ mod test { use crate::test::multipoint::mp_array; #[test] - #[allow(unused_variables)] fn geos_round_trip() { let arr = mp_array(); let geos_geoms: Vec> = arr.iter_geos().collect(); let round_trip: MultiPointArray = geos_geoms.try_into().unwrap(); - // assert_eq!(arr, round_trip); + assert_eq!(arr, round_trip); } } diff --git a/src/io/geos/array/multipolygon.rs b/src/io/geos/array/multipolygon.rs index e2cb2e7c..06dd1c97 100644 --- a/src/io/geos/array/multipolygon.rs +++ b/src/io/geos/array/multipolygon.rs @@ -221,11 +221,10 @@ mod test { use crate::test::multipolygon::mp_array; #[test] - #[allow(unused_variables)] fn geos_round_trip() { let arr = mp_array(); let geos_geoms: Vec> = arr.iter_geos().collect(); let round_trip: MultiPolygonArray = geos_geoms.try_into().unwrap(); - // assert_eq!(arr, round_trip); + assert_eq!(arr, round_trip); } } diff --git a/src/io/geos/array/polygon.rs b/src/io/geos/array/polygon.rs index b58945c1..de73a29d 100644 --- a/src/io/geos/array/polygon.rs +++ b/src/io/geos/array/polygon.rs @@ -184,11 +184,10 @@ mod test { use crate::test::polygon::p_array; #[test] - #[allow(unused_variables)] fn geos_round_trip() { let arr = p_array(); let geos_geoms: Vec> = arr.iter_geos().collect(); let round_trip: PolygonArray = geos_geoms.try_into().unwrap(); - // assert_eq!(arr, round_trip); + assert_eq!(arr, round_trip); } } diff --git a/src/io/wkb/writer/linestring.rs b/src/io/wkb/writer/linestring.rs index 365384c5..968b7f79 100644 --- a/src/io/wkb/writer/linestring.rs +++ b/src/io/wkb/writer/linestring.rs @@ -74,13 +74,12 @@ mod test { use crate::test::linestring::{ls0, ls1}; #[test] - #[allow(unused_variables)] fn round_trip() { let orig_arr: LineStringArray = vec![Some(ls0()), Some(ls1()), None].into(); let wkb_arr: WKBArray = (&orig_arr).into(); let new_arr: LineStringArray = wkb_arr.try_into().unwrap(); - // assert_eq!(orig_arr, new_arr); + assert_eq!(orig_arr, new_arr); } // // TODO: parsing WKBArray into LineStringArray not yet implemented diff --git a/src/io/wkb/writer/multilinestring.rs b/src/io/wkb/writer/multilinestring.rs index 14808a48..8638363f 100644 --- a/src/io/wkb/writer/multilinestring.rs +++ b/src/io/wkb/writer/multilinestring.rs @@ -82,12 +82,11 @@ mod test { use crate::test::multilinestring::{ml0, ml1}; #[test] - #[allow(unused_variables)] fn round_trip() { let orig_arr: MultiLineStringArray = vec![Some(ml0()), Some(ml1()), None].into(); let wkb_arr: WKBArray = (&orig_arr).into(); let new_arr: MultiLineStringArray = wkb_arr.try_into().unwrap(); - // assert_eq!(orig_arr, new_arr); + assert_eq!(orig_arr, new_arr); } } diff --git a/src/io/wkb/writer/multipoint.rs b/src/io/wkb/writer/multipoint.rs index 46ac9ed9..585de6c9 100644 --- a/src/io/wkb/writer/multipoint.rs +++ b/src/io/wkb/writer/multipoint.rs @@ -74,12 +74,11 @@ mod test { use crate::test::multipoint::{mp0, mp1}; #[test] - #[allow(unused_variables)] fn round_trip() { let orig_arr: MultiPointArray = vec![Some(mp0()), Some(mp1()), None].into(); let wkb_arr: WKBArray = (&orig_arr).into(); let new_arr: MultiPointArray = wkb_arr.try_into().unwrap(); - // assert_eq!(orig_arr, new_arr); + assert_eq!(orig_arr, new_arr); } } diff --git a/src/io/wkb/writer/multipolygon.rs b/src/io/wkb/writer/multipolygon.rs index 37dfb8f2..b4a16152 100644 --- a/src/io/wkb/writer/multipolygon.rs +++ b/src/io/wkb/writer/multipolygon.rs @@ -82,12 +82,11 @@ mod test { use crate::test::multipolygon::{mp0, mp1}; #[test] - #[allow(unused_variables)] fn round_trip() { let orig_arr: MultiPolygonArray = vec![Some(mp0()), Some(mp1()), None].into(); let wkb_arr: WKBArray = (&orig_arr).into(); let new_arr: MultiPolygonArray = wkb_arr.try_into().unwrap(); - // assert_eq!(orig_arr, new_arr); + assert_eq!(orig_arr, new_arr); } } diff --git a/src/io/wkb/writer/polygon.rs b/src/io/wkb/writer/polygon.rs index d5fec32d..f29d6c3f 100644 --- a/src/io/wkb/writer/polygon.rs +++ b/src/io/wkb/writer/polygon.rs @@ -106,7 +106,6 @@ mod test { use geozero::{CoordDimensions, ToWkb}; #[test] - #[allow(unused_variables)] fn round_trip() { let orig_arr: PolygonArray = vec![Some(p0()), Some(p1()), None].into(); let wkb_arr: WKBArray = (&orig_arr).into(); @@ -122,7 +121,7 @@ mod test { assert_eq!(wkb_arr.value(0).as_ref(), &wkb0); assert_eq!(wkb_arr.value(1).as_ref(), &wkb1); - // assert_eq!(orig_arr, new_arr); + assert_eq!(orig_arr, new_arr); } // // TODO: parsing WKBArray into LineStringArray not yet implemented