summaryrefslogtreecommitdiff
path: root/twasm/asm/tests.asm
diff options
context:
space:
mode:
authorandromeda <andromeda@lenovo>2026-03-12 14:03:46 +0100
committerandromeda <andromeda@lenovo>2026-03-12 14:03:46 +0100
commitc003e63d62a72c997151851fdcf999c22fd4bb1e (patch)
treebd378f29ad8425acdd13f6c245e23b52aadd83a8 /twasm/asm/tests.asm
parente775b05f85f689c22dac731e42f1540ca8b2e60c (diff)
remove unused code
Diffstat (limited to 'twasm/asm/tests.asm')
-rw-r--r--twasm/asm/tests.asm94
1 files changed, 0 insertions, 94 deletions
diff --git a/twasm/asm/tests.asm b/twasm/asm/tests.asm
index 96276c7..fc9fcc7 100644
--- a/twasm/asm/tests.asm
+++ b/twasm/asm/tests.asm
@@ -14,12 +14,6 @@ run_tests:
call print.test
call clear_test_arena
- call test_copy_byte
-
- call clear_test_arena
- call test_copy_token
-
- call clear_test_arena
call test_elemb
call clear_test_arena
@@ -47,94 +41,6 @@ run_tests:
.msg db "running test suite...", 0x0A, 0x00
; ------------------------------------------------------------------------------
-; test_copy_byte
-;
-; description:
-; tests copy_byte described functionality
-; ------------------------------------------------------------------------------
-
-test_copy_byte:
- mov rsi, .msg
- call print.test
-
- mov rdi, test_byte ; byte to be copied
- mov rsi, TEST_ARENA_ADDR ; location of test
- call copy_byte
-
- mov cx, [rsi]
- and ax, 0xFF ; only compare bottom byte
- and cx, 0xFF
- cmp ax, cx ; compare returned byte to copied byte
- jne .fail
- cmp al, [test_byte] ; compare returned byte to expected byte
- jne .fail
-
- .pass:
- mov rsi, msg_pass
- call print
- ret
- .fail:
- mov rsi, msg_fail
- call print
- ret
- .msg db "test_copy_byte...", 0x00
-
-; ------------------------------------------------------------------------------
-; test_copy_token
-;
-; description:
-; tests copy_token described functionality
-; ------------------------------------------------------------------------------
-
-test_copy_token:
- mov rsi, .msg
- call print.test
-
- ; test case: space terminated
-
- mov rdi, test_token_space ; read buffer
- mov rsi, TEST_ARENA_ADDR ; write buffer
- call copy_token
-
- ; check reported final indicies with the expected final indicies
- cmp rax, test_token_space + 8 ; last byte read
- jne .fail
- cmp rdx, TEST_ARENA_ADDR + 8 ; last byte written
- jne .fail
-
- mov rsi, TEST_ARENA_ADDR
- mov rcx, [rsi]
- cmp rcx, [test_token_space] ; check if copied token matches expected token
- jne .fail ; if not, fail
-
- ; test case: null terminated
-
- mov rdi, test_token_null ; read buffer
- mov rsi, TEST_ARENA_ADDR ; write buffer
- call copy_token
-
- ; check reported final indicies with the expected final indicies
- cmp rax, test_token_null + 8 ; last byte read
- jne .fail
- cmp rdx, TEST_ARENA_ADDR + 8 ; last byte written
- jne .fail
-
- mov rsi, TEST_ARENA_ADDR
- mov rcx, [rsi]
- cmp rcx, [test_token_null] ; check if copied token matches expected token
- jne .fail ; if not, fail
-
- .pass:
- mov rsi, msg_pass
- call print
- ret
- .fail:
- mov rsi, msg_fail
- call print
- ret
- .msg db "test_copy_token...", 0x00
-
-; ------------------------------------------------------------------------------
; test_elemb
;
; description: