diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2022-03-11 17:38:29 +0100 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2022-03-11 17:38:29 +0100 |
| commit | 1890372c9e64d1fb5ee45bbb2d785510a6011e70 (patch) | |
| tree | 41a5ad091d28fff254ac083fb32d9963f42850f9 /library/std/src/io/tests.rs | |
| parent | 4d7daa07b12fd60b4caa9d4af4baf7ead3c21de8 (diff) | |
| download | rust-1890372c9e64d1fb5ee45bbb2d785510a6011e70.tar.gz rust-1890372c9e64d1fb5ee45bbb2d785510a6011e70.zip | |
Update tests.
Diffstat (limited to 'library/std/src/io/tests.rs')
| -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()); } |
