Files
mercury/tests/hard_coded/from_int_uint16.exp
Julien Fischer 307b74467f Add tests of conversion from int -> 8 and 16 bit integers.
tests/hard_coded/from_int_int{8,16}.{m,exp}:
tests/hard_coded/from_int_uint{8,16}.{m,exp}:
    As above.

tests/hard_coded/Mmakefile:
    Add the new tests.
2017-09-08 04:04:01 -04:00

17 lines
402 B
Plaintext

from_int(-2147483648) = <<out-of-range>>
from_int(-32768) = <<out-of-range>>
from_int(-128) = <<out-of-range>>
from_int(0) = 0
from_int(1) = 1
from_int(2) = 2
from_int(8) = 8
from_int(10) = 10
from_int(16) = 16
from_int(127) = 127
from_int(32767) = 32767
from_int(32768) = 32768
from_int(65534) = 65534
from_int(65535) = 65535
from_int(65536) = <<out-of-range>>
from_int(2147483647) = <<out-of-range>>