Skip to content

Commit

Permalink
fix detail in string_slice test
Browse files Browse the repository at this point in the history
Signed-off-by: martinvuyk <martin.vuyklop@gmail.com>
  • Loading branch information
martinvuyk committed Nov 21, 2024
1 parent 7b02d0a commit 0ee6e6b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions stdlib/test/utils/test_string_slice.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit 0ee6e6b

Please sign in to comment.