From: Shriya Sharma Date: Fri, 17 Nov 2023 13:11:09 +0000 (+0000) Subject: Test case (all same nos) for maxloc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=10597e4a42583cc2c6c06b41aaa615c5a19c56cd;p=openpower-isa.git Test case (all same nos) for maxloc --- diff --git a/src/openpower/decoder/isa/maxloc.py b/src/openpower/decoder/isa/maxloc.py index c07de4d5..e71c36cf 100644 --- a/src/openpower/decoder/isa/maxloc.py +++ b/src/openpower/decoder/isa/maxloc.py @@ -35,3 +35,9 @@ if __name__ == '__main__': result = m2(arr) print("Index of the maximum value in an array is: %d" % result) assert (result == 0) + + arr = [5,5,5,5,5,5,5,5] + print("search list", arr) + result = m2(arr) + print("Index of the maximum value in an array is: %d" % result) + assert (result == 0)