Branch: refs/heads/master
Revision: cae3112
Author: mppf
Log Message:
Merge pull request #16441 from CaptainSharf/random_checks
Adding checks for methods in Random module to require array arguments to be rectangular
[PR by @CaptainSharf - thanks! Reviewed by @bradcray and @mppf. Tested by @mppf]
As part of this PR, adding checks for methods in random module to take valid parameters. Specifically
- Adding
compileErrorwhen the methodsfillRandom,shuffleandpermutationare invoked with non-rectangular arrays as arguments - Adding a
compileErrormessage when the methodsshuffleandpermutationare invoked withalgorithm=RNG.NPB - Modifying the docs for each of these methods to reflect the above mentioned changes
- Adding tests for validating whether array arguments passed to the methods
fillRandom,shuffleandpermutationare not rectangular
This PR contains the possible fix for #16425.
Modified Files:
A test/library/standard/Random/stonea/fillRandomAssociative.chpl
A test/library/standard/Random/stonea/fillRandomAssociative.good
A test/library/standard/Random/stonea/permutationAssociative.chpl
A test/library/standard/Random/stonea/permutationAssociative.good
A test/library/standard/Random/stonea/shuffleAssociative.chpl
A test/library/standard/Random/stonea/shuffleAssociative.good
M modules/standard/Random.chpl
Compare: https://github.com/chapel-lang/chapel/compare/cf3cf79ca52c...cae311281968