From 0aea50a877b0a1e97531ac78c1e50b58f8a5eaba Mon Sep 17 00:00:00 2001 From: Shriya Sharma Date: Fri, 17 Nov 2023 13:11:09 +0000 Subject: [PATCH] Test case (all same nos) for maxloc --- src/openpower/decoder/isa/maxloc.py | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.30.2