Skip to content

Commit

Permalink
Adapt casemap tests to API change
Browse files Browse the repository at this point in the history
  • Loading branch information
hsivonen committed Dec 18, 2024
1 parent 215e492 commit bbe1f71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions components/casemap/tests/conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,11 +354,11 @@ fn test_greek_upper() {

let assert_greek_uppercase = |input: &str, expected: &str| {
assert_eq!(
cm.uppercase_to_string(nfc.normalize(input).as_str(), modern_greek),
cm.uppercase_to_string(nfc.normalize(input).as_ref(), modern_greek),
nfc.normalize(expected)
);
assert_eq!(
cm.uppercase_to_string(nfd.normalize(input).as_str(), modern_greek),
cm.uppercase_to_string(nfd.normalize(input).as_ref(), modern_greek),
nfd.normalize(expected)
);
};
Expand Down
4 changes: 2 additions & 2 deletions components/casemap/tests/gen_greek_to_me.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ fn main() {
if !GeneralCategoryGroup::Letter.contains(gc.get(ch)) {
continue;
}

let nfd = decomposer.normalize_utf8(ch.encode_utf8(&mut [0; 4]).as_bytes());
let mut buf = [u8; 4];
let nfd = decomposer.normalize_utf8(ch.encode_utf8(&mut buf).as_bytes());
let mut data: Option<GreekPrecomposedLetterData> = None;

for nfd_ch in nfd.chars() {
Expand Down

0 comments on commit bbe1f71

Please sign in to comment.