fix test, add string unit test, refactor stack
All checks were successful
/ test (push) Successful in 56s
All checks were successful
/ test (push) Successful in 56s
This commit is contained in:
parent
b95d2954ba
commit
beaa325c7b
3 changed files with 37 additions and 20 deletions
12
tests/strings.ang
Normal file
12
tests/strings.ang
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
txt := "Hello world!"
|
||||
|
||||
# string length
|
||||
assertEq(txt.length(), 12)
|
||||
|
||||
# string split
|
||||
assertEq(txt.split(" ").length(), 2)
|
||||
|
||||
# string indexing
|
||||
assertEq(txt.at(1), "e")
|
||||
assertEq(txt.at(6), "w")
|
||||
Loading…
Add table
Add a link
Reference in a new issue