summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-02-15 22:10:46 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-02-15 22:10:49 +0100
commit6fd2c9b958ec17e5eb4bcfc365df126a89540bce (patch)
treeb5d9bbaf25b3c24afbd6cbe6d53f29e010bbff68 /lib
parent0888e4345c034b779a97cee382133937da3b24a8 (diff)
Remove irrelevant tests
Because StoreId objects do not contain bases anymore, we do not need these tests anymore. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/core/libimagstore/src/storeid.rs68
1 files changed, 0 insertions, 68 deletions
diff --git a/lib/core/libimagstore/src/storeid.rs b/lib/core/libimagstore/src/storeid.rs
index 754bc94b..d0a7d396 100644
--- a/lib/core/libimagstore/src/storeid.rs
+++ b/lib/core/libimagstore/src/storeid.rs
@@ -348,10 +348,6 @@ impl<'a> StoreIdIteratorWithStore<'a> {
#[cfg(test)]
mod test {
- use std::path::PathBuf;
-
- use storeid::StoreId;
- use storeid::StoreIdWithBase;
use storeid::IntoStoreId;
module_entry_path_mod!("test");
@@ -364,70 +360,6 @@ mod test {
}
#[test]
- fn test_baseless_path() {
- let id = StoreId::new(PathBuf::from("test"));
- assert!(id.is_ok());
- assert_eq!(id.unwrap(), StoreId(PathBuf::from("test")));
- }
-
- #[test]
- fn test_base_path() {
- let id = StoreId::new(PathBuf::from("test"));
- assert!(id.is_ok());
- assert_eq!(id.unwrap(), StoreId(PathBuf::from("test")));
- }
-
- #[test]
- fn test_adding_base_to_baseless_path() {
- let id = StoreId::new(PathBuf::from("test"));
-
- assert!(id.is_ok());
- let id = id.unwrap();
-
- assert_eq!(id, StoreId(PathBuf::from("test")));
-
- let storebase = PathBuf::from("/tmp/");
- let id = id.with_base(&storebase);
- assert_eq!(id, StoreIdWithBase(&PathBuf::from("/tmp/"), PathBuf::from("test")));
- }
-
- #[test]
- fn test_removing_base_from_base_path() {
- let id = StoreId::new(PathBuf::from("/tmp/test"));
-
- assert!(id.is_ok());
- let storebase = PathBuf::from("/tmp/");
- let id = id.unwrap().with_base(&storebase);
-
- assert_eq!(id, StoreIdWithBase(&PathBuf::from("/tmp/"), PathBuf::from("test")));
-
- let id = id.without_base();
- assert_eq!(id, StoreId(PathBuf::from("test")));
- }
-
- #[test]
- fn test_basefull_into_pathbuf_is_ok() {
- let id = StoreId::new(PathBuf::from("/tmp/test"));
- assert!(id.is_ok());
-
- let storebase = PathBuf::from("/tmp/");
- let id = id.unwrap().with_base(&storebase);
- assert!(id.into_pathbuf().is_ok());
- }
-
- #[test]
- fn test_basefull_into_pathbuf_is_correct() {
- let id = StoreId::new(PathBuf::from("/tmp/test"));
- assert!(id.is_ok());
-
- let storebase = PathBuf::from("/tmp/");
- let pb = id.unwrap().with_base(&storebase).into_pathbuf();
- assert!(pb.is_ok());
-
- assert_eq!(pb.unwrap(), PathBuf::from("/tmp/test"));
- }
-
- #[test]
fn storeid_in_collection() {
let p = module_path::ModuleEntryPath::new("1/2/3/4/5/6/7/8/9/0").into_storeid().unwrap();