From 10597e4a42583cc2c6c06b41aaa615c5a19c56cd 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