forked from M-Labs/nac3
nac3standalone: add test for max function
This commit is contained in:
parent
8241a29908
commit
1cc276cb43
|
@ -16,6 +16,7 @@ def output_float64(x: float):
|
|||
|
||||
|
||||
def run() -> int32:
|
||||
# min ===========
|
||||
output_int32(int32(min(True, False)))
|
||||
output_int32(int32(min(True, True)))
|
||||
output_int32(int32(min(False, False)))
|
||||
|
@ -39,4 +40,29 @@ def run() -> int32:
|
|||
output_float64(min(-12.234, 3.23))
|
||||
output_float64(min(0.1, 12.3))
|
||||
output_float64(min(1.1, 1.1))
|
||||
|
||||
# max ===========
|
||||
output_int32(int32(max(True, False)))
|
||||
output_int32(int32(max(True, True)))
|
||||
output_int32(int32(max(False, False)))
|
||||
|
||||
output_int32(max(-12, 0))
|
||||
output_int32(max(1, -3))
|
||||
output_int32(max(2, 2))
|
||||
|
||||
output_int64(max(int64(-12), int64(0)))
|
||||
output_int64(max(int64(1), int64(-3)))
|
||||
output_int64(max(int64(2), int64(2)))
|
||||
|
||||
output_uint32(max(uint32(12), uint32(0)))
|
||||
output_uint32(max(uint32(12), uint32(24)))
|
||||
output_uint32(max(uint32(2), uint32(2)))
|
||||
|
||||
output_uint64(max(uint64(12), uint64(0)))
|
||||
output_uint64(max(uint64(12), uint64(24)))
|
||||
output_uint64(max(uint64(2), uint64(2)))
|
||||
|
||||
output_float64(max(-12.234, 3.23))
|
||||
output_float64(max(0.1, 12.3))
|
||||
output_float64(max(1.1, 1.1))
|
||||
return 0
|
||||
|
|
Loading…
Reference in New Issue