Fix min() tests

This commit is contained in:
2025-07-21 16:06:28 +02:00
parent 34de8f351d
commit d14b90ffef

View File

@@ -22,7 +22,7 @@
mov rsi, %1
mov rdx, %1
mov rcx, rax
cmp rax, %1
cmp rax, rdx
%2 %%true
lea r8, [rel testMsg_False]
jmp %%cnt
@@ -264,31 +264,31 @@ _start:
mov rdi, -1337
mov rsi, 1337
call min
assert rdi, je, testMsg_assertIEqual
assert -1337, je, testMsg_assertIEqual
; TEST 2: min(MIN_INT64, MAX_INT64)
printTest(min2)
mov rdi, MIN_INT64
mov rsi, MAX_INT64
call min
assert rdi, je, testMsg_assertIEqual
assert MIN_INT64, je, testMsg_assertIEqual
; TEST 3: min(MIN_UINT64, MAX_UINT64)
printTest(min3)
mov rdi, MIN_UINT64
mov rsi, MAX_UINT64
call min
assert rdi, je, testMsg_assertIEqual
assert MAX_UINT64, je, testMsg_assertIEqual
; TEST 4: min(-1, 0)
printTest(min4)
mov rdi, -1
xor rsi, rdx
xor rsi, rsi
call min
assert rdi, je, testMsg_assertIEqual
assert -1, je, testMsg_assertIEqual
; TEST 5: min(MIN_UINT64, MIN_INT8)
printTest(min5)
mov rdi, MIN_UINT64
mov rsi, MIN_INT8
call min
assert rsi, je, testMsg_assertIEqual
assert MIN_INT8, je, testMsg_assertIEqual
%endif
;;;