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=e9d378daad5f875d02ae0a0c2e2c23b3fb16ea92;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)