incr.comp.: Remove out-dated unit test and unnecessary assertion.

This commit is contained in:
Michael Woerister 2017-09-22 16:59:31 +02:00
parent 45a03f153f
commit 89aec1eb0b
2 changed files with 0 additions and 52 deletions

View file

@ -244,9 +244,6 @@ impl DepGraph {
data.edges.borrow_mut().read(v);
let mut current = data.current.borrow_mut();
debug_assert!(current.node_to_node_index.contains_key(&v),
"DepKind {:?} should be pre-allocated but isn't.",
v.kind);
if let Some(&dep_node_index_new) = current.node_to_node_index.get(&v) {
current.read_index(dep_node_index_new);
} else {

View file

@ -953,52 +953,3 @@ fn test_find_source_directory_in_iter() {
PathBuf::from("crate-dir/s-1234-0000-working")].into_iter(), &already_visited),
None);
}
#[test]
fn test_find_metadata_hashes_iter()
{
assert_eq!(find_metadata_hashes_iter("testsvh2",
vec![
String::from("s-timestamp1-testsvh1"),
String::from("s-timestamp2-testsvh2"),
String::from("s-timestamp3-testsvh3"),
].into_iter()),
Some(OsString::from("s-timestamp2-testsvh2"))
);
assert_eq!(find_metadata_hashes_iter("testsvh2",
vec![
String::from("s-timestamp1-testsvh1"),
String::from("s-timestamp2-testsvh2"),
String::from("invalid-name"),
].into_iter()),
Some(OsString::from("s-timestamp2-testsvh2"))
);
assert_eq!(find_metadata_hashes_iter("testsvh2",
vec![
String::from("s-timestamp1-testsvh1"),
String::from("s-timestamp2-testsvh2-working"),
String::from("s-timestamp3-testsvh3"),
].into_iter()),
None
);
assert_eq!(find_metadata_hashes_iter("testsvh1",
vec![
String::from("s-timestamp1-random1-working"),
String::from("s-timestamp2-random2-working"),
String::from("s-timestamp3-random3-working"),
].into_iter()),
None
);
assert_eq!(find_metadata_hashes_iter("testsvh2",
vec![
String::from("timestamp1-testsvh2"),
String::from("timestamp2-testsvh2"),
String::from("timestamp3-testsvh2"),
].into_iter()),
None
);
}