File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -423,18 +423,18 @@ fn io_slice_mut_advance_slices() {
423
423
}
424
424
425
425
#[ test]
426
+ #[ should_panic]
426
427
fn io_slice_mut_advance_slices_empty_slice ( ) {
427
428
let mut empty_bufs = & mut [ ] [ ..] ;
428
- // Shouldn't panic.
429
429
IoSliceMut :: advance_slices ( & mut empty_bufs, 1 ) ;
430
430
}
431
431
432
432
#[ test]
433
+ #[ should_panic]
433
434
fn io_slice_mut_advance_slices_beyond_total_length ( ) {
434
435
let mut buf1 = [ 1 ; 8 ] ;
435
436
let mut bufs = & mut [ IoSliceMut :: new ( & mut buf1) ] [ ..] ;
436
437
437
- // Going beyond the total length should be ok.
438
438
IoSliceMut :: advance_slices ( & mut bufs, 9 ) ;
439
439
assert ! ( bufs. is_empty( ) ) ;
440
440
}
@@ -463,18 +463,18 @@ fn io_slice_advance_slices() {
463
463
}
464
464
465
465
#[ test]
466
+ #[ should_panic]
466
467
fn io_slice_advance_slices_empty_slice ( ) {
467
468
let mut empty_bufs = & mut [ ] [ ..] ;
468
- // Shouldn't panic.
469
469
IoSlice :: advance_slices ( & mut empty_bufs, 1 ) ;
470
470
}
471
471
472
472
#[ test]
473
+ #[ should_panic]
473
474
fn io_slice_advance_slices_beyond_total_length ( ) {
474
475
let buf1 = [ 1 ; 8 ] ;
475
476
let mut bufs = & mut [ IoSlice :: new ( & buf1) ] [ ..] ;
476
477
477
- // Going beyond the total length should be ok.
478
478
IoSlice :: advance_slices ( & mut bufs, 9 ) ;
479
479
assert ! ( bufs. is_empty( ) ) ;
480
480
}
You can’t perform that action at this time.
0 commit comments