mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-30 11:44:28 +03:00
Convert compile-time code to not require SIMD
This commit is contained in:
@@ -47,7 +47,7 @@ TEST(Shufti, BuildMask1) {
|
||||
|
||||
chars.set('a');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lomask, &himask);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lomask, (u8 *)&himask);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
u8 *lo = (u8 *)&lomask;
|
||||
@@ -75,7 +75,7 @@ TEST(Shufti, BuildMask2) {
|
||||
chars.set('a');
|
||||
chars.set('B');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lomask, &himask);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lomask, (u8 *)&himask);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
u8 *lo = (u8 *)&lomask;
|
||||
@@ -96,7 +96,7 @@ TEST(Shufti, BuildMask4) {
|
||||
chars.set('A');
|
||||
chars.set('b');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lomask, &himask);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lomask, (u8 *)&himask);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
u8 *lo = (u8 *)&lomask;
|
||||
@@ -113,7 +113,7 @@ TEST(Shufti, ExecNoMatch1) {
|
||||
CharReach chars;
|
||||
chars.set('a');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -132,7 +132,7 @@ TEST(Shufti, ExecNoMatch2) {
|
||||
chars.set('a');
|
||||
chars.set('B');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -150,7 +150,7 @@ TEST(Shufti, ExecNoMatch3) {
|
||||
CharReach chars;
|
||||
chars.set('V'); /* V = 0x56, e = 0x65 */
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
char t1[] = "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
||||
@@ -168,7 +168,7 @@ TEST(Shufti, ExecMatch1) {
|
||||
CharReach chars;
|
||||
chars.set('a');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -187,7 +187,7 @@ TEST(Shufti, ExecMatch2) {
|
||||
CharReach chars;
|
||||
chars.set('a');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -207,7 +207,7 @@ TEST(Shufti, ExecMatch3) {
|
||||
chars.set('a');
|
||||
chars.set('B');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -229,7 +229,7 @@ TEST(Shufti, ExecMatch4) {
|
||||
chars.set('A');
|
||||
chars.set('c');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -263,7 +263,7 @@ TEST(Shufti, ExecMatch5) {
|
||||
CharReach chars;
|
||||
chars.set('a');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -283,8 +283,8 @@ TEST(DoubleShufti, BuildMask1) {
|
||||
|
||||
lits.insert(make_pair('a', 'B'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1m, &hi1m,
|
||||
&lo2m, &hi2m);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1m, (u8 *)&hi1m,
|
||||
(u8 *)&lo2m, (u8 *)&hi2m);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
u8 *lo1 = (u8 *)&lo1m;
|
||||
@@ -326,8 +326,8 @@ TEST(DoubleShufti, BuildMask2) {
|
||||
lits.insert(make_pair('a','z'));
|
||||
lits.insert(make_pair('B','z'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1m, &hi1m,
|
||||
&lo2m, &hi2m);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1m, (u8 *)&hi1m,
|
||||
(u8 *)&lo2m, (u8 *)&hi2m);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
u8 *lo1 = (u8 *)&lo1m;
|
||||
@@ -354,8 +354,8 @@ TEST(DoubleShufti, BuildMask4) {
|
||||
lits.insert(make_pair('A','z'));
|
||||
lits.insert(make_pair('b','z'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1m, &hi1m,
|
||||
&lo2m, &hi2m);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1m, (u8 *)&hi1m,
|
||||
(u8 *)&lo2m, (u8 *)&hi2m);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
u8 *lo1 = (u8 *)&lo1m;
|
||||
@@ -383,8 +383,8 @@ TEST(DoubleShufti, BuildMask5) {
|
||||
CharReach bytes;
|
||||
bytes.set('X');
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(bytes, lits, &lo1m, &hi1m,
|
||||
&lo2m, &hi2m);
|
||||
bool ret = shuftiBuildDoubleMasks(bytes, lits, (u8 *)&lo1m, (u8 *)&hi1m,
|
||||
(u8 *)&lo2m, (u8 *)&hi2m);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
u8 *lo1 = (u8 *)&lo1m;
|
||||
@@ -421,8 +421,8 @@ TEST(DoubleShufti, BuildMask6) {
|
||||
lits.insert(make_pair('A','x'));
|
||||
lits.insert(make_pair('b','x'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1m, &hi1m,
|
||||
&lo2m, &hi2m);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1m, (u8 *)&hi1m,
|
||||
(u8 *)&lo2m, (u8 *)&hi2m);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
u8 *lo1 = (u8 *)&lo1m;
|
||||
@@ -473,8 +473,8 @@ TEST(DoubleShufti, BuildMask7) {
|
||||
lits.insert(make_pair('u','v'));
|
||||
lits.insert(make_pair('w','x'));
|
||||
|
||||
bool rv = shuftiBuildDoubleMasks(CharReach(), lits, &lo1m, &hi1m,
|
||||
&lo2m, &hi2m);
|
||||
bool rv = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1m, (u8 *)&hi1m,
|
||||
(u8 *)&lo2m, (u8 *)&hi2m);
|
||||
ASSERT_FALSE(rv);
|
||||
}
|
||||
|
||||
@@ -485,8 +485,8 @@ TEST(DoubleShufti, ExecNoMatch1) {
|
||||
|
||||
lits.insert(make_pair('a','b'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1,
|
||||
&lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -506,7 +506,8 @@ TEST(DoubleShufti, ExecNoMatch1b) {
|
||||
|
||||
lits.insert(make_pair('b','a'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -527,7 +528,8 @@ TEST(DoubleShufti, ExecNoMatch2) {
|
||||
lits.insert(make_pair('a','b'));
|
||||
lits.insert(make_pair('B','b'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -548,14 +550,15 @@ TEST(DoubleShufti, ExecNoMatch2b) {
|
||||
lits.insert(make_pair('b','a'));
|
||||
lits.insert(make_pair('b','B'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
|
||||
for (size_t i = 0; i < 16; i++) {
|
||||
const u8 *rv = shuftiDoubleExec(lo1, hi1, lo2, hi2,
|
||||
(u8 *)t1 + i, (u8 *)t1 + strlen(t1));
|
||||
const u8 *rv = shuftiDoubleExec(lo1, hi1, lo2, hi2, (u8 *)t1 + i,
|
||||
(u8 *)t1 + strlen(t1));
|
||||
|
||||
ASSERT_EQ((size_t)t1 + i + 15, (size_t)rv);
|
||||
}
|
||||
@@ -568,7 +571,8 @@ TEST(DoubleShufti, ExecNoMatch3) {
|
||||
|
||||
lits.insert(make_pair('V','e'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
char t1[] = "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
||||
@@ -588,7 +592,8 @@ TEST(DoubleShufti, ExecNoMatch3b) {
|
||||
|
||||
lits.insert(make_pair('e','V'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
char t1[] = "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
||||
@@ -608,7 +613,8 @@ TEST(DoubleShufti, ExecMatchShort1) {
|
||||
|
||||
lits.insert(make_pair('a','b'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -629,7 +635,8 @@ TEST(DoubleShufti, ExecMatch1) {
|
||||
|
||||
lits.insert(make_pair('a','b'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -650,7 +657,8 @@ TEST(DoubleShufti, ExecMatch2) {
|
||||
|
||||
lits.insert(make_pair('a','a'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -672,7 +680,8 @@ TEST(DoubleShufti, ExecMatch3) {
|
||||
lits.insert(make_pair('B','a'));
|
||||
lits.insert(make_pair('a','a'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -696,7 +705,8 @@ TEST(DoubleShufti, ExecMatch4) {
|
||||
lits.insert(make_pair('C','a'));
|
||||
lits.insert(make_pair('c','a'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -738,7 +748,8 @@ TEST(DoubleShufti, ExecMatch4b) {
|
||||
lits.insert(make_pair('a','C'));
|
||||
lits.insert(make_pair('a','c'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -777,7 +788,8 @@ TEST(DoubleShufti, ExecMatch5) {
|
||||
|
||||
lits.insert(make_pair('a','A'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(CharReach(), lits, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -801,7 +813,8 @@ TEST(DoubleShufti, ExecMatchMixed1) {
|
||||
// just one one-byte literal
|
||||
onebyte.set('a');
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(onebyte, twobyte, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(onebyte, twobyte, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -825,7 +838,8 @@ TEST(DoubleShufti, ExecMatchMixed2) {
|
||||
onebyte.set('a');
|
||||
twobyte.insert(make_pair('x', 'y'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(onebyte, twobyte, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(onebyte, twobyte, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -859,7 +873,8 @@ TEST(DoubleShufti, ExecMatchMixed3) {
|
||||
onebyte.set('a');
|
||||
twobyte.insert(make_pair('x', 'y'));
|
||||
|
||||
bool ret = shuftiBuildDoubleMasks(onebyte, twobyte, &lo1, &hi1, &lo2, &hi2);
|
||||
bool ret = shuftiBuildDoubleMasks(onebyte, twobyte, (u8 *)&lo1, (u8 *)&hi1,
|
||||
(u8 *)&lo2, (u8 *)&hi2);
|
||||
ASSERT_TRUE(ret);
|
||||
|
||||
const int len = 420;
|
||||
@@ -892,7 +907,7 @@ TEST(ReverseShufti, ExecNoMatch1) {
|
||||
CharReach chars;
|
||||
chars.set('a');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -911,7 +926,7 @@ TEST(ReverseShufti, ExecNoMatch2) {
|
||||
chars.set('a');
|
||||
chars.set('B');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -929,7 +944,7 @@ TEST(ReverseShufti, ExecNoMatch3) {
|
||||
CharReach chars;
|
||||
chars.set('V'); /* V = 0x56, e = 0x65 */
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
char t1[] = "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
||||
@@ -947,7 +962,7 @@ TEST(ReverseShufti, ExecMatch1) {
|
||||
CharReach chars;
|
||||
chars.set('a');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -968,7 +983,7 @@ TEST(ReverseShufti, ExecMatch2) {
|
||||
CharReach chars;
|
||||
chars.set('a');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -990,7 +1005,7 @@ TEST(ReverseShufti, ExecMatch3) {
|
||||
chars.set('a');
|
||||
chars.set('B');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -1024,7 +1039,7 @@ TEST(ReverseShufti, ExecMatch4) {
|
||||
chars.set('A');
|
||||
chars.set('c');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
/* 0123456789012345678901234567890 */
|
||||
@@ -1059,7 +1074,7 @@ TEST(ReverseShufti, ExecMatch5) {
|
||||
CharReach chars;
|
||||
chars.set('a');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
char t1[] = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";
|
||||
@@ -1079,7 +1094,7 @@ TEST(ReverseShufti, ExecMatch6) {
|
||||
CharReach chars;
|
||||
chars.set('a');
|
||||
|
||||
int ret = shuftiBuildMasks(chars, &lo, &hi);
|
||||
int ret = shuftiBuildMasks(chars, (u8 *)&lo, (u8 *)&hi);
|
||||
ASSERT_NE(-1, ret);
|
||||
|
||||
const size_t len = 256;
|
||||
|
Reference in New Issue
Block a user