diff options
| author | andromeda <andromeda@lenovo> | 2026-03-18 18:41:48 +0100 |
|---|---|---|
| committer | andromeda <andromeda@lenovo> | 2026-03-18 18:41:48 +0100 |
| commit | ec88bd7381f78e834177d4326a010bfe5fb8c11e (patch) | |
| tree | 3f3873164ffb2f5c64251e25ea9355c4dd5912ab | |
| parent | d5c2dde221650a601fe4fa873b719400c4038dd1 (diff) | |
rearrange test case
| -rw-r--r-- | twasm/asm/tests.asm | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/twasm/asm/tests.asm b/twasm/asm/tests.asm index 49ffba4..b7a9bec 100644 --- a/twasm/asm/tests.asm +++ b/twasm/asm/tests.asm @@ -56,31 +56,31 @@ test_elemb: ; [0] mov rdi, 5 - mov rsi, test_elemb_5 - mov dl, [test_elemb_5] + mov rsi, .case1 + mov dl, [.case1] call elemb cmp al, 1 jne .fail ; [n - 1] mov rdi, 5 - mov rsi, test_elemb_5 - mov dl, [test_elemb_5 + 4] + mov rsi, .case1 + mov dl, [.case1 + 4] call elemb cmp al, 1 jne .fail ; [1] mov rdi, 5 - mov rsi, test_elemb_5 - mov dl, [test_elemb_5 + 1] + mov rsi, .case1 + mov dl, [.case1 + 1] call elemb cmp al, 1 jne .fail ; not present mov rdi, 5 - mov rsi, test_elemb_5 + mov rsi, .case1 mov dl, 0xDA call elemb cmp al, 0 @@ -88,7 +88,7 @@ test_elemb: ; 0 length list mov rdi, 0 - mov rsi, test_elemb_0 + mov rsi, .case0 mov dl, 0x34 call elemb cmp al, 0 @@ -102,6 +102,8 @@ test_elemb: mov rsi, msg_fail call print ret + .case0: ; [This Page Intentionally Left Blank] + .case1 db 0x54, 0x00, 0x21, 0x20, 0x34 .msg db "test_elemb...", 0x00 ; ------------------------------------------------------------------------------ @@ -507,6 +509,3 @@ msg_fail: times (TEST_LINE_LENGTH + .start - .end) db " ", .start db "failed." .end db 0x0A, 0x00 - -test_elemb_0: ; [This Page Intentionally Left Blank] -test_elemb_5 db 0x54, 0x00, 0x21, 0x20, 0x34 |
