Add conditional code for tests.asm (include certain tests or not)
This commit is contained in:
@@ -11,6 +11,7 @@ extern strlen
|
||||
|
||||
section .rodata
|
||||
TEST_print equ 1
|
||||
TEST_puts equ 1
|
||||
TEST_strlen equ 1
|
||||
|
||||
; print()
|
||||
@@ -37,24 +38,30 @@ _start:
|
||||
;---
|
||||
;--- print()
|
||||
;---
|
||||
%if TEST_print
|
||||
lea rdi, [rel msgPrint]
|
||||
call print
|
||||
%endif
|
||||
|
||||
;---
|
||||
;--- puts()
|
||||
;---
|
||||
%if TEST_puts
|
||||
lea rdi, [rel msgPuts]
|
||||
call puts
|
||||
%endif
|
||||
|
||||
;---
|
||||
;--- strlen()
|
||||
;---
|
||||
%if TEST_strlen
|
||||
; TEST 1
|
||||
lea rdi, [rel strlenStr1]
|
||||
call strlen
|
||||
; TEST 2
|
||||
lea rdi, [rel strlenStr2]
|
||||
call strlen
|
||||
%endif
|
||||
|
||||
;---
|
||||
;--- exit()
|
||||
|
Reference in New Issue
Block a user