Adjustments

This commit is contained in:
Andras Schmelczer 2025-06-22 22:14:43 +01:00
parent a0cfef3238
commit 5e64297cec
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
3 changed files with 46 additions and 29 deletions

View file

@ -78,7 +78,7 @@ mod tests {
}
fn ins_custom(text: &str, lj: bool, rj: bool) -> RawOperation<String> {
RawOperation::Insert(vec![Token::new(text.to_string(), text.to_string(), lj, rj)])
RawOperation::Insert(vec![Token::new(text.to_owned(), text.to_owned(), lj, rj)])
}
#[test]
@ -88,7 +88,10 @@ mod tests {
assert_eq!(result.len(), 1);
match &result[0] {
RawOperation::Insert(tokens) => {
let originals: String = tokens.iter().map(|t| t.original()).collect();
let originals: String = tokens
.iter()
.map(crate::tokenizer::token::Token::original)
.collect();
assert_eq!(originals, "abc");
}
_ => panic!("Expected single Insert operation"),