Add lli support for running example test cases #327

Merged
sb10q merged 7 commits from lli-support into master 2023-09-30 09:31:18 +08:00
1 changed files with 14 additions and 0 deletions
Showing only changes of commit c010fd9a09 - Show all commits

View File

@ -14,6 +14,10 @@ def output_uint32(x: uint32):
def output_uint64(x: uint64):
...
@extern
def output_float64(x: float):
...
@extern
def output_int32_list(x: list[int32]):
...
@ -38,6 +42,15 @@ def test_output_uint32():
def test_output_uint64():
output_uint64(uint64(256))
def test_output_float64():
output_float64(0.0)
output_float64(1.0)
output_float64(-1.0)
output_float64(128.0)
output_float64(-128.0)
output_float64(16.25)
output_float64(-16.25)
def test_output_asciiart():
for i in range(17):
output_asciiart(i)
@ -54,6 +67,7 @@ def run() -> int32:
test_output_int64()
test_output_uint32()
test_output_uint64()
test_output_float64()
test_output_asciiart()
test_output_int32_list()
test_output_str_family()