mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-11 01:28:19 +03:00
Do the default func test last so we can see what the failure is on more explicitly
This commit is contained in:
parent
ede4d7fbca
commit
b021e9b648
@ -289,12 +289,11 @@ FUNC(zero_last_n_bytes)(integer_t vec, const integer_t index, char n) {
|
||||
return andnot_si(mask, vec);
|
||||
}
|
||||
|
||||
#define check_chunk() { \
|
||||
if (n > -1) { \
|
||||
#define check_chunk() if (n > -1) { \
|
||||
const uint8_t *ans = haystack + n; \
|
||||
zero_upper(); \
|
||||
return ans < limit ? ans : NULL; \
|
||||
}}
|
||||
}
|
||||
|
||||
#define find_match(haystack, sz, get_test_vec) { \
|
||||
zero_upper(); \
|
||||
|
@ -118,6 +118,10 @@ test_find_either_of_two_bytes(PyObject *self UNUSED, PyObject *args) {
|
||||
func = find_either_of_two_bytes_128; break;
|
||||
case 3:
|
||||
func = find_either_of_two_bytes_256; break;
|
||||
case 0: break;
|
||||
default:
|
||||
PyErr_SetString(PyExc_ValueError, "Unknown which_function");
|
||||
return NULL;
|
||||
}
|
||||
uint8_t *abuf;
|
||||
if (posix_memalign((void**)&abuf, 64, 256 + buf.len) != 0) {
|
||||
|
@ -293,11 +293,12 @@ class TestParser(BaseTest):
|
||||
|
||||
def test(buf, a, b, align_offset=0):
|
||||
a, b = ord(a), ord(b)
|
||||
sizes = [0]
|
||||
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)
|
||||
|
||||
for sz in sizes:
|
||||
|
Loading…
Reference in New Issue
Block a user