mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-20 00:00:10 +02:00
Add some tests for Limit, BytesMut and Reader (#785)
This commit is contained in:
@@ -186,6 +186,13 @@ fn split_off_oob() {
|
||||
let _ = hello.split_off(44);
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic = "split_off out of bounds"]
|
||||
fn bytes_mut_split_off_oob() {
|
||||
let mut hello = BytesMut::from(&b"helloworld"[..]);
|
||||
let _ = hello.split_off(44);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn split_off_uninitialized() {
|
||||
let mut bytes = BytesMut::with_capacity(1024);
|
||||
|
||||
Reference in New Issue
Block a user