library/array.m:
Workaround the fact that C#'s 'is' operator has some fairly surprising
behaviour with arrays of integer types.
tests/hard_coded/array_primitives.{m,exp}:
tests/hard_coded/array_shrinks.{m,exp}:
Improve the coverage of these tests.
The behaviour of array.shrink/3 was not defined if its first argument was
negative. If this occurred, the C backends would return an empty array, while
the non-C backends would abort. This diff changes the behaviour of shrink/3 so
that it throws an exception if its first argument is negative.
The implementation of shrink/3 for the Java backend did not handle the case
where the array's element type was represented by the one the following Java
primitive types: byte, short, long and float. Handle those cases.
library/array.m:
Make the above fixes.
Fix a typo in my previous commit.
NEWS:
Note the change in behaviour if the first argument of shrink/3 is
negative.
tests/hard_coded/Mmakefile:
tests/hard_coded/array_shrink.{m,exp}:
Add a test case.