diff options
| -rw-r--r-- | library/std/src/io/tests.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/io/tests.rs b/library/std/src/io/tests.rs index eb626348564..d5a8c93b0ce 100644 --- a/library/std/src/io/tests.rs +++ b/library/std/src/io/tests.rs @@ -423,18 +423,18 @@ fn io_slice_mut_advance_slices() { } #[test] +#[should_panic] fn io_slice_mut_advance_slices_empty_slice() { let mut empty_bufs = &mut [][..]; - // Shouldn't panic. IoSliceMut::advance_slices(&mut empty_bufs, 1); } #[test] +#[should_panic] fn io_slice_mut_advance_slices_beyond_total_length() { let mut buf1 = [1; 8]; let mut bufs = &mut [IoSliceMut::new(&mut buf1)][..]; - // Going beyond the total length should be ok. IoSliceMut::advance_slices(&mut bufs, 9); assert!(bufs.is_empty()); } @@ -463,18 +463,18 @@ fn io_slice_advance_slices() { } #[test] +#[should_panic] fn io_slice_advance_slices_empty_slice() { let mut empty_bufs = &mut [][..]; - // Shouldn't panic. IoSlice::advance_slices(&mut empty_bufs, 1); } #[test] +#[should_panic] fn io_slice_advance_slices_beyond_total_length() { let buf1 = [1; 8]; let mut bufs = &mut [IoSlice::new(&buf1)][..]; - // Going beyond the total length should be ok. IoSlice::advance_slices(&mut bufs, 9); assert!(bufs.is_empty()); } |
