From 73769de734bb435a24db0d1e66f69842060cef23 Mon Sep 17 00:00:00 2001 From: Wonwoo Choi Date: Thu, 10 Jan 2019 13:45:18 +0900 Subject: [PATCH] Change name of Store tests --- src/configuration/mod.rs | 52 ++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/configuration/mod.rs b/src/configuration/mod.rs index 5cd573b63..069daa00c 100644 --- a/src/configuration/mod.rs +++ b/src/configuration/mod.rs @@ -101,34 +101,34 @@ mod tests { use super::*; #[test] - fn configuration_read_write() { - let mut config = Store::new(); - assert_eq!(config.read::(), None); - assert_eq!(config.read::(), None); - config.write(42usize); - config.write(-3isize); - assert_eq!(config.read::(), Some(&42)); - assert_eq!(config.read::(), Some(&-3)); - config.write(3usize); - assert_eq!(config.read::(), Some(&3)); + fn store_read_write() { + let mut store = Store::new(); + assert_eq!(store.read::(), None); + assert_eq!(store.read::(), None); + store.write(42usize); + store.write(-3isize); + assert_eq!(store.read::(), Some(&42)); + assert_eq!(store.read::(), Some(&-3)); + store.write(3usize); + assert_eq!(store.read::(), Some(&3)); } #[test] - fn configuration_clone() { - let mut config = Store::new(); - config.write(42usize); - config.write(String::from("foo")); - - let mut new_config = config.clone(); - new_config.write(3usize); - new_config.write(4u32); - - assert_eq!(config.read::(), Some(&42)); - assert_eq!(config.read::(), None); - assert_eq!(config.read::(), Some(&"foo".into())); - - assert_eq!(new_config.read::(), Some(&3)); - assert_eq!(new_config.read::(), Some(&4)); - assert_eq!(new_config.read::(), Some(&"foo".into())); + fn store_clone() { + let mut store = Store::new(); + store.write(42usize); + store.write(String::from("foo")); + + let mut new_store = store.clone(); + new_store.write(3usize); + new_store.write(4u32); + + assert_eq!(store.read::(), Some(&42)); + assert_eq!(store.read::(), None); + assert_eq!(store.read::(), Some(&"foo".into())); + + assert_eq!(new_store.read::(), Some(&3)); + assert_eq!(new_store.read::(), Some(&4)); + assert_eq!(new_store.read::(), Some(&"foo".into())); } }