Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bluurryy committed Dec 23, 2024
1 parent b00d0ca commit 8cf2325
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"abcdecdeab",
"abcdecdeabecde",
"alloc",
"Appendable",
"arrayref",
"backshift",
"backshifted",
Expand Down
6 changes: 4 additions & 2 deletions src/tests/from_std/bump_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ fn test_split_off_ascii() {
let cd = ab.split_off(2);
assert_eq!(ab, "AB");
assert_eq!(cd, "CD");
assert_eq!(ab.capacity(), orig_capacity);
assert_eq!(ab.capacity(), ab.len());
assert_eq!(cd.capacity(), orig_capacity - ab.len());
}

#[test]
Expand All @@ -291,7 +292,8 @@ fn test_split_off_unicode() {
let go = nihon.split_off("日本".len());
assert_eq!(nihon, "日本");
assert_eq!(go, "語");
assert_eq!(nihon.capacity(), orig_capacity);
assert_eq!(nihon.capacity(), nihon.len());
assert_eq!(go.capacity(), orig_capacity - nihon.len());
}

#[test]
Expand Down

0 comments on commit 8cf2325

Please sign in to comment.