[Chapel Merge] Fix test failures caused by PR #20140 (removing ar

Branch: refs/heads/main
Revision: a9ff0f1
Author: stonea
Link: Fix test failures caused by PR #20140 (removing array functions) by stonea · Pull Request #20177 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #20177 from stonea/remove_array_funcs_test_fixes

Fix test failures caused by PR #20140 (removing array functions)

This aims to fix the failures noted here:
https://chapel.discourse.group/t/cron-xc-none-gnu-slurm/13768

and here:

https://chapel.discourse.group/t/cron-perf-chapcs/13774

Array.find returns a tuple: (didFind, idx) where didFind is a bool and idx is the first index of the array containing the element. The doc says idx is unspecified if not found but we had some tests that relied on this returning 0.
With the reduction approach it looks like it will return the first index in the domain if it doesn't find the desired element.

Either way looking at the first element of the (didFind, idx) tuple is the right thing to do.

[Reviewed by nobody; simple test fix]

Modified Files:
M test/library/packages/LinearAlgebra/performance/MatrixUtils.chpl

M test/sparse/CS/multiplication/performance.chpl

Compare: https://github.com/chapel-lang/chapel/compare/962eb2e0081e...a9ff0f1028e9