mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-21 03:27:55 +03:00
...
This commit is contained in:
parent
b021e9b648
commit
41ec46d5bb
@ -290,17 +290,16 @@ def test_expected(src, expected, which=2):
|
||||
pb(b'"\xef\x93\x94\x95"', '"\uf4d4\ufffd"')
|
||||
|
||||
def test_find_either_of_two_bytes(self):
|
||||
sizes = []
|
||||
if has_sse4_2:
|
||||
sizes.append(2)
|
||||
if has_avx2:
|
||||
sizes.append(3)
|
||||
sizes.append(0)
|
||||
|
||||
def test(buf, a, b, align_offset=0):
|
||||
a, b = ord(a), ord(b)
|
||||
sizes = []
|
||||
if has_sse4_2:
|
||||
sizes.append(2)
|
||||
if has_avx2:
|
||||
sizes.append(3)
|
||||
sizes.append(0)
|
||||
expected = test_find_either_of_two_bytes(buf, a, b, 1)
|
||||
|
||||
expected = test_find_either_of_two_bytes(buf, a, b, 1, 0)
|
||||
for sz in sizes:
|
||||
actual = test_find_either_of_two_bytes(buf, a, b, sz, align_offset)
|
||||
self.ae(expected, actual, f'Failed for: {buf!r} at {sz=} and {align_offset=}')
|
||||
|
Loading…
Reference in New Issue
Block a user