Format and fix tests

This commit is contained in:
Austen Adler 2023-04-26 23:32:29 -04:00
parent 021ac810e4
commit 57d83a349d
3 changed files with 3 additions and 4 deletions

View File

@ -4,10 +4,10 @@ use std::str::FromStr;
use crate::{ use crate::{
dd, dd,
ddmmss,
dmm, dmm,
dms, dms,
plus, //xpin plus, //xpin
ddmmss,
utm, utm,
Coordinate, Coordinate,
Error, Error,

View File

@ -169,9 +169,8 @@ mod tests {
Ok(Coordinate::from(LatLon::new(-90.0_f64, 100.0_f64).unwrap())) Ok(Coordinate::from(LatLon::new(-90.0_f64, 100.0_f64).unwrap()))
); );
// TODO: Are these truncated or rounded?
assert_eq!( assert_eq!(
Coordinate::from_str("694733N1081419W").unwrap().0, Coordinate::from_str("694734N1081420W").unwrap().0,
Coordinate::from(LatLon::new(69.79268710495744, -108.23886036872865).unwrap()).0 Coordinate::from(LatLon::new(69.79268710495744, -108.23886036872865).unwrap()).0
) )
} }

View File

@ -2,11 +2,11 @@ use std::{fmt, str::FromStr};
pub mod all; pub mod all;
mod common; mod common;
pub mod dd; pub mod dd;
pub mod ddmmss;
pub mod dmm; pub mod dmm;
pub mod dms; pub mod dms;
pub mod latlon; pub mod latlon;
pub mod plus; pub mod plus;
pub mod ddmmss;
pub mod urls; pub mod urls;
pub mod utm; pub mod utm;
pub use error::Error; pub use error::Error;