Lines Matching refs:buf1
1290 static void DoStrcmpTest(uint8_t* buf1, uint8_t* buf2, size_t len) { in DoStrcmpTest() argument
1292 memset(buf1, (32 + (len % 96)), len - 1); in DoStrcmpTest()
1293 buf1[len-1] = '\0'; in DoStrcmpTest()
1296 ASSERT_EQ(0, strcmp(reinterpret_cast<char*>(buf1), in DoStrcmpTest()
1301 static void DoStrcmpFailTest(uint8_t* buf1, uint8_t* buf2, size_t len1, size_t len2) { in DoStrcmpFailTest() argument
1304 memset(buf1, c, len1 - 1); in DoStrcmpFailTest()
1305 buf1[len1-1] = '\0'; in DoStrcmpFailTest()
1308 ASSERT_NE(0, strcmp(reinterpret_cast<char*>(buf1), in DoStrcmpFailTest()
1320 buf1[len-1] = '\0'; in DoStrcmpFailTest()
1324 buf1[len-2] = diff_c; in DoStrcmpFailTest()
1325 ASSERT_NE(0, strcmp(reinterpret_cast<char*>(buf1), in DoStrcmpFailTest()
1328 buf1[len-2] = c; in DoStrcmpFailTest()
1330 ASSERT_NE(0, strcmp(reinterpret_cast<char*>(buf1), in DoStrcmpFailTest()
1343 static void DoMemcmpTest(uint8_t* buf1, uint8_t* buf2, size_t len) { in DoMemcmpTest() argument
1344 memset(buf1, len+1, len); in DoMemcmpTest()
1346 ASSERT_EQ(0, memcmp(buf1, buf2, len)); in DoMemcmpTest()
1349 static void DoMemcmpFailTest(uint8_t* buf1, uint8_t* buf2, size_t len1, size_t len2) { in DoMemcmpFailTest() argument
1357 memset(buf1, len2+1, len); in DoMemcmpFailTest()
1358 buf1[len-1] = len2; in DoMemcmpFailTest()
1360 ASSERT_NE(0, memcmp(buf1, buf2, len)); in DoMemcmpFailTest()
1362 buf1[len-1] = len2+1; in DoMemcmpFailTest()
1364 ASSERT_NE(0, memcmp(buf1, buf2, len)); in DoMemcmpFailTest()