From 2bf4b723265552c27665a0096b4c1593b028efd4 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Thu, 6 Jun 2024 09:51:55 +0800 Subject: [PATCH] Fix test. --- tests/string.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/string.rs b/tests/string.rs index 59c9f0670..b1addd725 100644 --- a/tests/string.rs +++ b/tests/string.rs @@ -103,9 +103,9 @@ fn test_string_index() { // overflow assert_eq!(engine.eval::(r#"let y = "hello"; y[..] = "x"; y"#).unwrap(), "x"); // overflow - assert_eq!(engine.eval::(r#"let y = "hello"; y.crop(..); y"#).unwrap(), "hello"); + assert_eq!(engine.eval::(r#"let y = "hello"; crop(y, ..); y"#).unwrap(), "hello"); // overflow - assert_eq!(engine.eval::(r#"let y = "hello"; y.crop(..=); y"#).unwrap(), "hello"); + assert_eq!(engine.eval::(r#"let y = "hello"; crop(y, ..=); y"#).unwrap(), "hello"); // mut slice index assert_eq!(engine.eval::(r#"let y = "hello"; y[1] = 'i'; y"#).unwrap(), "hillo");