[standalone] Add tests for string equality

This commit is contained in:
David Mak 2024-08-21 16:24:05 +08:00
parent 4d80ba38b7
commit b8dab6cf7c
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
@extern
def output_bool(x: bool):
...
def str_eq():
output_bool("" == "")
output_bool("a" == "")
output_bool("a" == "b")
output_bool("b" == "a")
output_bool("a" == "a")
output_bool("test string" == "test string")
output_bool("test string1" == "test string2")
def str_ne():
output_bool("" != "")
output_bool("a" != "")
output_bool("a" != "b")
output_bool("b" != "a")
output_bool("a" != "a")
output_bool("test string" != "test string")
output_bool("test string1" != "test string2")
def run() -> int32:
str_eq()
str_ne()
return 0