Skip to content

Commit

Permalink
Fix VecDeque's rotate_left and rotate_right panic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroclobo committed Jul 13, 2023
1 parent c0a105b commit 30a029e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/alloc/src/collections/vec_deque/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 30a029e

Please sign in to comment.