提交 89aec1eb 编写于 作者: M Michael Woerister

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

上级 45a03f15
......@@ -244,9 +244,6 @@ pub fn read(&self, v: DepNode) {
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 {
......
......@@ -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
);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册