add list indexing to tests
This commit is contained in:
parent
28f87d6561
commit
081a0fdb18
1 changed files with 6 additions and 0 deletions
|
|
@ -23,8 +23,14 @@ while x <= 100 {
|
|||
x = x + 1
|
||||
}
|
||||
|
||||
# list concatenation
|
||||
assertEq([1, 2] + [3], [1, 2, 3])
|
||||
assertEq(["Eny", "meanie"] + ["minie", "moe"], ["Eny", "meanie", "minie", "moe"])
|
||||
|
||||
# string splitting
|
||||
assertEq("abcd".split(""), ["a", "b", "c", "d"])
|
||||
assertEq("the, first, time".split(", "), ["the", "first", "time"])
|
||||
|
||||
# list indexing
|
||||
assertEq([1, 2, 3].at(1), 2)
|
||||
assertEq(["a", "b", "c"].at(2), "c")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue