Fix test_math test

This commit is contained in:
Wesley Moore 2025-02-13 20:32:39 +10:00
parent 99aab87cbd
commit b256bfd783
No known key found for this signature in database

View file

@ -2,6 +2,15 @@
test_add64() {
result=$("${QEMU}" -B 0x80000000 -s 2k tests/math_add64.elf)
# 3.5
# 3.75
expected=$(cat << END
00000003.80000000
00000003.C0000000
END
)
test $? -eq 0 && test "${result}" = "00000003.80000000\n00000003.C0000000" # 3.5, 3.75
# TODO: Ideally this test would allow calling the binary repeatedly with
# different inputs.
test $? -eq 0 && test "$result" = "$expected"
}