Fix VecDeque's rotate_left and rotate_right panic tests
This commit is contained in:
parent
c0a105be7c
commit
30a029e51b
1 changed files with 2 additions and 2 deletions
|
@ -351,14 +351,14 @@ fn test_rotate_left_right() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic = "assertion failed: mid <= self.len()"]
|
||||
#[should_panic = "assertion failed: n <= self.len()"]
|
||||
fn test_rotate_left_panic() {
|
||||
let mut tester: VecDeque<_> = (1..=10).collect();
|
||||
tester.rotate_left(tester.len() + 1);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic = "assertion failed: k <= self.len()"]
|
||||
#[should_panic = "assertion failed: n <= self.len()"]
|
||||
fn test_rotate_right_panic() {
|
||||
let mut tester: VecDeque<_> = (1..=10).collect();
|
||||
tester.rotate_right(tester.len() + 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue