23 constexpr
size_t kSize = 4096 * 4;
28 for (
size_t i = 0;
i < kSize; ++
i) {
29 src[
i] =
static_cast<char>(
i);
30 dst[
i] =
static_cast<char>(255 -
i);
35 TEST(memcpy, zero_len)
39 char* srcNull =
nullptr;
40 char* dstNull =
nullptr;
41 memcpy(dstNull, srcNull, 0);
50 memcpy(dst, src, len);
51 for (
size_t i = 0;
i < len; ++
i) {
56 EXPECT_EQ(src[len], static_cast<char>(len));
57 EXPECT_EQ(dst[len], static_cast<char>(255 - len));
62 for (
size_t len = 1; len < 8; ++len) {
68 for (
size_t len = 8; len < 128; ++len) {
72 for (
size_t len = 128; len < kSize; len += 128) {
76 for (
size_t len = 128; len < kSize; len += 73) {
#define EXPECT_EQ(val1, val2)
FOLLY_DISABLE_UNDEFINED_BEHAVIOR_SANITIZER("nonnull-attribute")