add more tests

This commit is contained in:
nora 2025-03-09 17:24:18 +01:00
parent 0af012d43a
commit 72f74c972d
7 changed files with 123 additions and 31 deletions

21
tests/helper.S Normal file
View file

@ -0,0 +1,21 @@
.macro START_TEST
.section .text
.globl _start
_start:
.endm
.macro ASSERT_EQ actual expected
li t6, \expected
bne \actual, t6, fail
.endm
.macro PASS
li a7, -1
li a0, 1
ecall
.endm
fail:
li a7, -1
li a0, 0
ecall