Skip to content

Commit

Permalink
Fix test.
Browse files Browse the repository at this point in the history
  • Loading branch information
schungx committed Jun 6, 2024
1 parent d35fdde commit 2bf4b72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ fn test_string_index() {
// overflow
assert_eq!(engine.eval::<String>(r#"let y = "hello"; y[..] = "x"; y"#).unwrap(), "x");
// overflow
assert_eq!(engine.eval::<String>(r#"let y = "hello"; y.crop(..); y"#).unwrap(), "hello");
assert_eq!(engine.eval::<String>(r#"let y = "hello"; crop(y, ..); y"#).unwrap(), "hello");
// overflow
assert_eq!(engine.eval::<String>(r#"let y = "hello"; y.crop(..=); y"#).unwrap(), "hello");
assert_eq!(engine.eval::<String>(r#"let y = "hello"; crop(y, ..=); y"#).unwrap(), "hello");

// mut slice index
assert_eq!(engine.eval::<String>(r#"let y = "hello"; y[1] = 'i'; y"#).unwrap(), "hillo");
Expand Down

0 comments on commit 2bf4b72

Please sign in to comment.