Commit Graph

1 Commits

Author SHA1 Message Date
Julien Fischer
2f39008fbf Add tests of int -> {int32,uint32} conversion.
Fix a bug in int -> uint32 conversion for the C grades.

tests/Mmakefile:
tests/hard_coded/from_int_int32.{m,exp}:
tests/hard_coded/from_int_uint32.m:
     Add the above tests.

tests/hard_coded/from_int_uint32.exp:
     Expected output for machines with a 64-bit int type.

tests/hard_coded/from_int_uint32.exp2:
     Expected output for machines with a 32-bit int type.

library/uint32.m:
     Fix a bug in the definition of from_int/2.  On machines where Mercury has
     a 64-bit int type the conversion should succeed for inputs up to (and
     including) UINT32_MAX.
2017-09-13 00:53:17 -04:00