From fc33f9fa8da2e3ade6ff0b047d467da91b41ca7e Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Wed, 1 Apr 2020 15:03:55 -0600 Subject: [PATCH] remove superfluous tests These tests are just testing how rust features works, not anything in this lib. --- geo-types/src/coordinate.rs | 28 ---------------------------- geo-types/src/geometry.rs | 30 ------------------------------ geo-types/src/point.rs | 28 ---------------------------- 3 files changed, 86 deletions(-) diff --git a/geo-types/src/coordinate.rs b/geo-types/src/coordinate.rs index 0e85c1236..dbc12f9c5 100644 --- a/geo-types/src/coordinate.rs +++ b/geo-types/src/coordinate.rs @@ -7,34 +7,6 @@ use crate::{CoordinateType, Point}; /// as an envelope, a precision model, and spatial reference system /// information), a `Coordinate` only contains ordinate values and accessor /// methods. -/// -/// ## Equality Examples -/// -/// ``` -/// use geo_types::Coordinate; -/// -/// let c1 = Coordinate { x: 1.0, y: 2.0}; -/// let c2 = Coordinate { x: 1.0, y: 2.0} ; -/// assert_eq!(c1, c2); -/// -/// let c3 = Coordinate { x: 1.0, y: 2.1}; -/// assert_ne!(c1, c3); -/// ``` -/// -/// ``` -/// use geo_types::Coordinate; -/// -/// struct AssertEq(pub T); -/// let _: AssertEq> = AssertEq(Coordinate { x: 1, y: 2 }); -/// ``` -/// -/// ```compile_fail -/// use geo_types::Coordinate; -/// -/// struct AssertEq(pub T); -/// // Eq impl is not derived for Coordinate because f32 is not Eq -/// let _: AssertEq> = AssertEq(Coordinate { x: 1.0, y: 2.0 }); -/// ``` #[derive(Eq, PartialEq, Clone, Copy, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct Coordinate diff --git a/geo-types/src/geometry.rs b/geo-types/src/geometry.rs index 452d4b3c9..a69870f8f 100644 --- a/geo-types/src/geometry.rs +++ b/geo-types/src/geometry.rs @@ -23,36 +23,6 @@ use std::fmt; /// let pn = Point::try_from(pe).unwrap(); /// ``` /// -/// ## Equality Examples -/// -/// ``` -/// use geo_types::{Geometry, Point}; -/// -/// let p1 = Point::new(1.0, 2.0); -/// let p2 = Point::new(1.0, 2.0); -/// let g1 = Geometry::Point(p1); -/// let g2 = Geometry::Point(p2); -/// assert_eq!(g1, g2); -/// -/// let p3 = Point::new(1.0, 2.1); -/// let g3 = Geometry::Point(p3); -/// assert_ne!(g1, g3); -/// ``` -/// -/// ``` -/// use geo_types::{Geometry, Point}; -/// -/// struct AssertEq(pub T); -/// let _: AssertEq> = AssertEq(Geometry::Point(Point::new(1, 2))); -/// ``` -/// -/// ```compile_fail -/// use geo_types::{Geometry, Point}; -/// -/// struct AssertEq(pub T); -/// // Eq impl is not derived for Geometry because f32 is not Eq -/// let _: AssertEq> = AssertEq(Geometry::Point(Point::new(1.0, 2.0))); -/// ``` #[derive(Eq, PartialEq, Clone, Debug, Hash)] pub enum Geometry where diff --git a/geo-types/src/point.rs b/geo-types/src/point.rs index ebaefcbeb..3fc3dae22 100644 --- a/geo-types/src/point.rs +++ b/geo-types/src/point.rs @@ -17,34 +17,6 @@ use std::ops::Sub; /// let c = Coordinate { x: 10., y: 20. }; /// let p2: Point = c.into(); /// ``` -/// -/// ## Equality Examples -/// -/// ``` -/// use geo_types::Point; -/// -/// let p1 = Point::new(1.0, 2.0); -/// let p2 = Point::new(1.0, 2.0); -/// assert_eq!(p1, p2); -/// -/// let p3 = Point::new(1.0, 2.1); -/// assert_ne!(p1, p3); -/// ``` -/// -/// ``` -/// use geo_types::Point; -/// -/// struct AssertEq(pub T); -/// let _: AssertEq> = AssertEq(Point::new(1, 2)); -/// ``` -/// -/// ```compile_fail -/// use geo_types::Point; -/// -/// struct AssertEq(pub T); -/// // Eq impl is not derived for Point because f32 is not Eq -/// let _: AssertEq> = AssertEq(Point::new(1.0, 2.0)); -/// ``` #[derive(Eq, PartialEq, Clone, Copy, Debug, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] pub struct Point(pub Coordinate)