summaryrefslogtreecommitdiff
path: root/twasm/asm/tests.asm
diff options
context:
space:
mode:
authorandromeda <andromeda@lenovo>2026-03-18 16:21:34 +0100
committerandromeda <andromeda@lenovo>2026-03-18 16:21:34 +0100
commitde60e52c5af08d57cf83b5b110ec19562aa41b17 (patch)
tree4c993f796d7a8e1bace0cb83ab65dec91cad235f /twasm/asm/tests.asm
parent17a0a1a406bb52bde8c1306cd7ff44c00acb84de (diff)
range check char length
Diffstat (limited to 'twasm/asm/tests.asm')
-rw-r--r--twasm/asm/tests.asm9
1 files changed, 9 insertions, 0 deletions
diff --git a/twasm/asm/tests.asm b/twasm/asm/tests.asm
index df60eb4..c4cd545 100644
--- a/twasm/asm/tests.asm
+++ b/twasm/asm/tests.asm
@@ -377,6 +377,13 @@ test_evaluate_constant:
cmp rdx, 0x03
jne .fail
+ ; oversized char
+ mov rdi, .case1c
+ mov rsi, 7
+ call evaluate_constant
+ cmp rdx, 0xFF
+ jne .fail
+
.pass:
mov rsi, msg_pass
call print
@@ -396,6 +403,8 @@ test_evaluate_constant:
.case3h_solution dq 0x243F6A8885A308D3
.case0c db '"char"'
.case0c_solution dq "char"
+ .case1c db '"chars"'
+ .case1c_solution dq "chars"
.case0q db "0q31103755242102"
.case0q_solution dq 0q31103755242102