Test case (all zeroes) for maxloc
authorShriya Sharma <shriya@redsemiconductor.com>
Fri, 17 Nov 2023 12:02:01 +0000 (12:02 +0000)
committerShriya Sharma <shriya@redsemiconductor.com>
Fri, 17 Nov 2023 12:02:01 +0000 (12:02 +0000)
src/openpower/decoder/isa/maxloc.py

index 668fdd6bd225ed60fb2a37e3991ae8de94d83142..ca1b06bacdf7962e2df9a1d6d217d7053539b957 100644 (file)
@@ -27,3 +27,8 @@ if __name__ == '__main__':
      print("search list", arr)
      result = m2(arr)
      print("Index of the maximum value in an array is: %d" % result)
+
+     arr = [0,0,0,0,0,0,0,0]
+     print("search list", arr)
+     result = m2(arr)
+     print("Index of the maximum value in an array is: %d" % result)