From 0ee6e6b2dd027d31d73c4afd8bc0b57be30b108e Mon Sep 17 00:00:00 2001 From: martinvuyk Date: Thu, 21 Nov 2024 19:14:56 -0300 Subject: [PATCH] fix detail in string_slice test Signed-off-by: martinvuyk --- stdlib/test/utils/test_string_slice.mojo | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stdlib/test/utils/test_string_slice.mojo b/stdlib/test/utils/test_string_slice.mojo index 2e65601816..1a47a96a5b 100644 --- a/stdlib/test/utils/test_string_slice.mojo +++ b/stdlib/test/utils/test_string_slice.mojo @@ -488,10 +488,10 @@ def test_splitlines(): def test_iter(): - vs = "123" + vs = StringSlice("123") # Borrow immutably - fn conc(vs: StringLiteral) -> String: + fn conc(vs: StringSlice) -> String: var c = String("") for v in iter(vs): c += v @@ -505,8 +505,7 @@ def test_iter(): assert_equal(321, atol(concat)) idx = -1 - vs = "mojošŸ”„" - for item in vs: + for item in StringSlice("mojošŸ”„"): idx += 1 if idx == 0: assert_equal("m", item)