test less cases of utf-8 validation, to avoid taking forever sv_maxu_works-initial
authorJacob Lifshay <programmerjake@gmail.com>
Wed, 31 Aug 2022 04:54:39 +0000 (21:54 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Wed, 31 Aug 2022 04:54:39 +0000 (21:54 -0700)
src/openpower/test/algorithms/svp64_utf_8_validation.py

index f040f1e6f114927bfcae0714d9d76bb737e0c42c..afcbde6809917ba138a15dad733ade4411b75a3e 100644 (file)
@@ -347,7 +347,7 @@ class SVP64UTF8ValidationTestCase(TestAccumulatorBase):
         # type: (bytes | str) -> None
         if isinstance(data, str):
             data = data.encode("utf-8")
-        data = b' ' * 8 + data + b' ' * 8
+        data = data.center(8, b' ')
         for i in range(len(data)):
             self.run_case(data[i:], src_loc_at=1)
             self.run_case(data[:i], src_loc_at=1)