mirror of
https://github.com/kmc7468/cs220.git
synced 2025-12-14 22:18:46 +00:00
Update assignment 7
This commit is contained in:
@@ -24,4 +24,21 @@ mod test {
|
|||||||
vec![]
|
vec![]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_find_usize() {
|
||||||
|
assert_eq!(
|
||||||
|
find(&[1, 2, 3], &[1, 2, 3, 4, 1, 2, 3, 4]).collect::<Vec<usize>>(),
|
||||||
|
vec![0, 4]
|
||||||
|
);
|
||||||
|
|
||||||
|
assert_eq!(
|
||||||
|
find(
|
||||||
|
&[5, 5, 7, 5],
|
||||||
|
&[5, 5, 7, 5, 5, 8, 5, 5, 9, 5, 5, 7, 5, 5, 7, 5]
|
||||||
|
)
|
||||||
|
.collect::<Vec<usize>>(),
|
||||||
|
vec![0, 9, 12]
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user