mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 09:23:44 +00:00
Add a test of uint -> uint64 conversion.
library/uint64.m:
Fix a typo that broke uint64.cast_from_uint/1.
tests/hard_coded/Mmakefile:
tests/hard_coded/from_uint_uint64.{m,exp,exp2}:
Add a test of uint -> uint64 conversion.
tests/hard_coded/from_int_int*.m:
tests/hard_coded/from_uint_uint*.m:
Fix errors in comments.
16 lines
449 B
Plaintext
16 lines
449 B
Plaintext
from_uint(0) = 0
|
|
from_uint(1) = 1
|
|
from_uint(2) = 2
|
|
from_uint(8) = 8
|
|
from_uint(10) = 10
|
|
from_uint(16) = 16
|
|
from_uint(127) = 127
|
|
from_uint(32767) = 32767
|
|
from_uint(2147483647) = 2147483647
|
|
from_uint(2147483648) = 2147483648
|
|
from_uint(4294967295) = 4294967295
|
|
from_uint(4294967296) = <<out-of-range>>
|
|
from_uint(9223372036854775807) = <<out-of-range>>
|
|
from_uint(9223372036854775808) = <<out-of-range>>
|
|
from_uint(18446744073709551615) = <<out-of-range>>
|