FIX tests minu,maxu: ...UEqual, not ...IEqual
This commit is contained in:
@@ -364,31 +364,31 @@ _start:
|
|||||||
mov rdi, -1337
|
mov rdi, -1337
|
||||||
mov rsi, 1337
|
mov rsi, 1337
|
||||||
call minu
|
call minu
|
||||||
assert 1337, je, testMsg_assertIEqual
|
assert 1337, je, testMsg_assertUEqual
|
||||||
; TEST 2: minu(MIN_INT64, MAX_INT64)
|
; TEST 2: minu(MIN_INT64, MAX_INT64)
|
||||||
printTest(minu2)
|
printTest(minu2)
|
||||||
mov rdi, MIN_INT64
|
mov rdi, MIN_INT64
|
||||||
mov rsi, MAX_INT64
|
mov rsi, MAX_INT64
|
||||||
call minu
|
call minu
|
||||||
assert MAX_INT64, je, testMsg_assertIEqual
|
assert MAX_INT64, je, testMsg_assertUEqual
|
||||||
; TEST 3: minu(MIN_UINT64, MAX_UINT64)
|
; TEST 3: minu(MIN_UINT64, MAX_UINT64)
|
||||||
printTest(minu3)
|
printTest(minu3)
|
||||||
mov rdi, MIN_UINT64
|
mov rdi, MIN_UINT64
|
||||||
mov rsi, MAX_UINT64
|
mov rsi, MAX_UINT64
|
||||||
call minu
|
call minu
|
||||||
assert MIN_UINT64, je, testMsg_assertIEqual
|
assert MIN_UINT64, je, testMsg_assertUEqual
|
||||||
; TEST 4: minu(-1, 0)
|
; TEST 4: minu(-1, 0)
|
||||||
printTest(minu4)
|
printTest(minu4)
|
||||||
mov rdi, -1
|
mov rdi, -1
|
||||||
xor rsi, rsi
|
xor rsi, rsi
|
||||||
call minu
|
call minu
|
||||||
assert 0, je, testMsg_assertIEqual
|
assert 0, je, testMsg_assertUEqual
|
||||||
; TEST 5: minu(MIN_UINT64, MIN_INT8)
|
; TEST 5: minu(MIN_UINT64, MIN_INT8)
|
||||||
printTest(minu5)
|
printTest(minu5)
|
||||||
mov rdi, MIN_UINT64
|
mov rdi, MIN_UINT64
|
||||||
mov rsi, MIN_INT8
|
mov rsi, MIN_INT8
|
||||||
call minu
|
call minu
|
||||||
assert MIN_UINT64, je, testMsg_assertIEqual
|
assert MIN_UINT64, je, testMsg_assertUEqual
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
;--- max()
|
;--- max()
|
||||||
@@ -436,31 +436,31 @@ _start:
|
|||||||
mov rdi, -1337
|
mov rdi, -1337
|
||||||
mov rsi, 1337
|
mov rsi, 1337
|
||||||
call maxu
|
call maxu
|
||||||
assert -1337, je, testMsg_assertIEqual
|
assert -1337, je, testMsg_assertUEqual
|
||||||
; TEST 2: maxu(MIN_INT64, MAX_INT64)
|
; TEST 2: maxu(MIN_INT64, MAX_INT64)
|
||||||
printTest(maxu2)
|
printTest(maxu2)
|
||||||
mov rdi, MIN_INT64
|
mov rdi, MIN_INT64
|
||||||
mov rsi, MAX_INT64
|
mov rsi, MAX_INT64
|
||||||
call maxu
|
call maxu
|
||||||
assert MIN_INT64, je, testMsg_assertIEqual
|
assert MIN_INT64, je, testMsg_assertUEqual
|
||||||
; TEST 3: maxu(MIN_UINT64, MAX_UINT64)
|
; TEST 3: maxu(MIN_UINT64, MAX_UINT64)
|
||||||
printTest(maxu3)
|
printTest(maxu3)
|
||||||
mov rdi, MIN_UINT64
|
mov rdi, MIN_UINT64
|
||||||
mov rsi, MAX_UINT64
|
mov rsi, MAX_UINT64
|
||||||
call maxu
|
call maxu
|
||||||
assert MAX_UINT64, je, testMsg_assertIEqual
|
assert MAX_UINT64, je, testMsg_assertUEqual
|
||||||
; TEST 4: maxu(-1, 0)
|
; TEST 4: maxu(-1, 0)
|
||||||
printTest(maxu4)
|
printTest(maxu4)
|
||||||
mov rdi, -1
|
mov rdi, -1
|
||||||
xor rsi, rsi
|
xor rsi, rsi
|
||||||
call maxu
|
call maxu
|
||||||
assert -1, je, testMsg_assertIEqual
|
assert -1, je, testMsg_assertUEqual
|
||||||
; TEST 5: maxu(MIN_UINT64, MIN_INT8)
|
; TEST 5: maxu(MIN_UINT64, MIN_INT8)
|
||||||
printTest(maxu5)
|
printTest(maxu5)
|
||||||
mov rdi, MIN_UINT64
|
mov rdi, MIN_UINT64
|
||||||
mov rsi, MIN_INT8
|
mov rsi, MIN_INT8
|
||||||
call maxu
|
call maxu
|
||||||
assert MIN_INT8, je, testMsg_assertIEqual
|
assert MIN_INT8, je, testMsg_assertUEqual
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
;--- clamp()
|
;--- clamp()
|
||||||
|
Reference in New Issue
Block a user