Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxw59 committed Jul 9, 2024
1 parent c361e46 commit 97a7850
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,15 @@ fn shared_is_unique() {
assert!(c.is_unique());
}

#[test]
fn mut_shared_is_unique() {
let mut b = BytesMut::from(LONG);
let c = b.split().freeze();
assert!(!c.is_unique());
drop(b);
assert!(c.is_unique());
}

#[test]
fn test_bytesmut_from_bytes_static() {
let bs = b"1b23exfcz3r";
Expand Down

0 comments on commit 97a7850

Please sign in to comment.