Lines Matching refs:ptr

212   Character *ptr, *ptr1, *ptr2;  member in StringTestState
240 ptr = ptr1 = ptr2 = nullptr; in ResetPointers()
242 ptr = glob_ptr + alignments[align1_index_]; in ResetPointers()
261 memcpy(state.ptr, state.ptr2, 2 * state.MAX_LEN); in TEST()
267 strcpy(state.ptr + state.MAX_LEN - 1, state.ptr1); in TEST()
270 EXPECT_TRUE(memcmp(state.ptr, state.ptr2, 2 * state.MAX_LEN) == 0); in TEST()
517 memcpy(state.ptr, state.ptr1, state.MAX_LEN); in TEST()
522 memset(state.ptr + state.MAX_LEN, '\1', state.MAX_LEN); in TEST()
523 memcpy(state.ptr + state.MAX_LEN, state.ptr1, pos + 1); in TEST()
524 state.ptr[2 * state.MAX_LEN - 1] = '\0'; in TEST()
527 ASSERT_FALSE((memcmp(state.ptr1, state.ptr, state.MAX_LEN)) != 0 || in TEST()
528 (memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN) != 0)); in TEST()
541 memcpy(state.ptr, state.ptr1, state.MAX_LEN); in TEST()
546 memset(state.ptr + state.MAX_LEN, '\1', state.MAX_LEN); in TEST()
547 memcpy(state.ptr + state.MAX_LEN, state.ptr1, pos + 1); in TEST()
548 state.ptr[2 * state.MAX_LEN - 1] = '\0'; in TEST()
551 ASSERT_FALSE((memcmp(state.ptr1, state.ptr, state.MAX_LEN)) != 0 || in TEST()
552 (memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN) != 0)); in TEST()
563 memcpy(state.ptr, state.ptr2, state.MAX_LEN + state.len[i]); in TEST()
569 memcpy(state.ptr + state.MAX_LEN - 1, state.ptr1, pos + 1); in TEST()
571 memcpy(state.ptr + state.MAX_LEN - 1, state.ptr1, state.len[i]); in TEST()
572 state.ptr[state.MAX_LEN + state.len[i] - 1] = '\0'; in TEST()
577 ASSERT_TRUE(memcmp(state.ptr, state.ptr2, state.MAX_LEN + state.len[i]) == 0); in TEST()
596 memcpy(state.ptr, state.ptr1, state.MAX_LEN); in TEST()
599 memcpy(state.ptr + state.MAX_LEN, state.ptr2, state.MAX_LEN); in TEST()
602 memcpy(state.ptr + state.MAX_LEN, state.ptr1, state.MAX_LEN); in TEST()
603 state.ptr[2 * state.MAX_LEN - 1] = '\0'; in TEST()
605 memcpy(state.ptr + state.MAX_LEN, state.ptr1, pos + 1); in TEST()
609 ASSERT_FALSE((memcmp(state.ptr1, state.ptr, state.MAX_LEN) != 0) || in TEST()
610 (memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN) != 0)); in TEST()
623 memcpy(state.ptr, state.ptr2, 2 * state.MAX_LEN); in TEST()
632 strncpy(state.ptr + state.MAX_LEN - 1, state.ptr1, std::min(actual, pos)); in TEST()
633 state.ptr[state.MAX_LEN + std::min(actual, pos) - 1] = '\0'; in TEST()
636 ASSERT_EQ(memcmp(state.ptr, state.ptr2, 2 * state.MAX_LEN), 0); in TEST()
684 memcpy(state.ptr, state.ptr1, state.MAX_LEN); in TEST()
692 memset(state.ptr + state.MAX_LEN, '\1', state.MAX_LEN); in TEST()
693 memcpy(state.ptr + state.MAX_LEN, state.ptr1, copy_len); in TEST()
696 memset(state.ptr + state.MAX_LEN + ptr1_len, '\0', copy_len - ptr1_len); in TEST()
705 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr, state.MAX_LEN)); in TEST()
707 ASSERT_EQ(0, memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN)); in TEST()
721 memcpy(state.ptr, state.ptr1, state.MAX_LEN); in TEST()
729 memset(state.ptr + state.MAX_LEN, '\1', state.MAX_LEN); in TEST()
730 memcpy(state.ptr + state.MAX_LEN, state.ptr1, copy_len); in TEST()
733 memset(state.ptr + state.MAX_LEN + ptr1_len, '\0', copy_len - ptr1_len); in TEST()
742 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr, state.MAX_LEN)); in TEST()
744 ASSERT_EQ(0, memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN)); in TEST()
920 memcpy(state.ptr, state.ptr1, state.len[i]); in TEST()
921 memcpy(state.ptr1 + pos, state.ptr, state.len[i]); in TEST()
933 char* ptr = reinterpret_cast<char*>(malloc(sizeof(char) * len)); in TEST() local
938 ASSERT_TRUE(ptr != nullptr); in TEST()
947 memcpy(ptr, ptr1, len); in TEST()
948 memcpy(ptr1 + pos, ptr, len); in TEST()
950 ASSERT_TRUE(memmove(ptr2 + pos, ptr, len) == ptr2 + pos); in TEST()
953 free(ptr); in TEST()