Files
mercury/tests/hard_coded/from_uint_uint64.exp2
Julien Fischer 7bffc574e9 Fix a bug in uint64.cast_from_uint/1.
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.
2021-07-10 04:44:51 +10:00

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>>