From 14224be23dc2f253a240b85214927d97e1160669 Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Sun, 30 Jul 2017 13:20:36 -0700 Subject: Remove ConfigResult; close #36 --- tests/get.rs | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'tests/get.rs') diff --git a/tests/get.rs b/tests/get.rs index 1922fca..995f73c 100644 --- a/tests/get.rs +++ b/tests/get.rs @@ -41,9 +41,10 @@ fn test_not_found() { let res = c.get::("not_found"); assert!(res.is_err()); - assert_eq!(res.unwrap_err().to_string(), - "configuration property \"not_found\" not found" - .to_string()); + assert_eq!( + res.unwrap_err().to_string(), + "configuration property \"not_found\" not found".to_string() + ); } #[test] @@ -84,7 +85,10 @@ fn test_get_scalar_path() { let c = make(); assert_eq!(c.get("place.favorite").ok(), Some(false)); - assert_eq!(c.get("place.creator.name").ok(), Some("John Smith".to_string())); + assert_eq!( + c.get("place.creator.name").ok(), + Some("John Smith".to_string()) + ); } #[test] @@ -104,7 +108,10 @@ fn test_map() { let m: HashMap = c.get("place").unwrap(); assert_eq!(m.len(), 7); - assert_eq!(m["name"].clone().into_str().unwrap(), "Torre di Pisa".to_string()); + assert_eq!( + m["name"].clone().into_str().unwrap(), + "Torre di Pisa".to_string() + ); assert_eq!(m["reviews"].clone().into_int().unwrap(), 3866); } @@ -128,7 +135,10 @@ fn test_map_struct() { let s: Settings = c.deserialize().unwrap(); assert_eq!(s.place.len(), 7); - assert_eq!(s.place["name"].clone().into_str().unwrap(), "Torre di Pisa".to_string()); + assert_eq!( + s.place["name"].clone().into_str().unwrap(), + "Torre di Pisa".to_string() + ); assert_eq!(s.place["reviews"].clone().into_int().unwrap(), 3866); } -- cgit v1.2.3