aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Chambers <[email protected]>2021-10-20 20:41:41 +1300
committerAndrew Chambers <[email protected]>2021-10-20 20:41:52 +1300
commit98f42697409d53ee45da744d167ab875ed4fde8b (patch)
treea8ffdb8bc7861cb21d8b52155b5df829d00b03a9 /test
parent7a5f42708b3b30bdfbc263db010832172d99a02d (diff)
Use a fatal error instead of assert, improve jmp tests.
Diffstat (limited to 'test')
-rw-r--r--test/test.sh18
1 files changed, 12 insertions, 6 deletions
diff --git a/test/test.sh b/test/test.sh
index c68e469..3510fa4 100644
--- a/test/test.sh
+++ b/test/test.sh
@@ -160,15 +160,21 @@ conditioncodes="
o p pe po s z
"
-for fill in 0 1 129
+t "l:\n .fill 1, 1, 0x00 \njmp l"
+t "jmp l\n .fill 1, 1, 0x00 \nl:"
+for cc in $conditioncodes
+do
+ t "l:\n .fill 1, 1, 0x00 \nj${cc} l"
+ t "j${cc} l\n .fill 1, 1, 0x00 \nl:"
+done
+
+# Check boundary on jump relaxing.
+for fill in 0 $(seq 120 140)
do
t "l:\n .fill $fill, 1, 0x00 \njmp l"
t "jmp l\n .fill $fill, 1, 0x00 \nl:"
- for cc in $conditioncodes
- do
- t "l:\n .fill $fill, 1, 0x00 \nj${cc} l"
- t "j${cc} l\n .fill $fill, 1, 0x00 \nl:"
- done
+ t "l:\n .fill $fill, 1, 0x00 \njz l"
+ t "jz l\n .fill $fill, 1, 0x00 \nl:"
done
for cc in $conditioncodes