Lines Matching refs:ptr2

212   Character *ptr, *ptr1, *ptr2;  member in StringTestState
240 ptr = ptr1 = ptr2 = nullptr; in ResetPointers()
244 ptr2 = glob_ptr2 + alignments[align2_index_]; in ResetPointers()
259 memset(state.ptr2, '\2', state.MAX_LEN); in TEST()
260 state.ptr2[state.MAX_LEN - 1] = '\0'; in TEST()
261 memcpy(state.ptr, state.ptr2, 2 * state.MAX_LEN); in TEST()
269 EXPECT_TRUE(strcat(state.ptr2, state.ptr1) == state.ptr2); in TEST()
270 EXPECT_TRUE(memcmp(state.ptr, state.ptr2, 2 * state.MAX_LEN) == 0); in TEST()
478 memset(state.ptr2, 'n', state.MAX_LEN); in TEST()
480 state.ptr2[state.len[i] - 1] = '\0'; in TEST()
486 memcpy(state.ptr1, state.ptr2, state.len[i]); in TEST()
488 actual = strcmp(state.ptr1, state.ptr2); in TEST()
490 memcpy(state.ptr1, state.ptr2, pos); in TEST()
491 if (state.ptr1[pos] > state.ptr2[pos]) { in TEST()
493 } else if (state.ptr1[pos] == state.ptr2[pos]) { in TEST()
495 state.ptr2[pos + 1] = '\0'; in TEST()
500 actual = strcmp(state.ptr1, state.ptr2); in TEST()
519 memset(state.ptr2, '\1', state.MAX_LEN); in TEST()
520 state.ptr2[state.MAX_LEN - 1] = '\0'; in TEST()
526 ASSERT_TRUE(stpcpy(state.ptr2, state.ptr1) == state.ptr2 + strlen(state.ptr1)); in TEST()
528 (memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN) != 0)); in TEST()
543 memset(state.ptr2, '\1', state.MAX_LEN); in TEST()
544 state.ptr2[state.MAX_LEN - 1] = '\0'; in TEST()
550 ASSERT_TRUE(strcpy(state.ptr2, state.ptr1) == state.ptr2); in TEST()
552 (memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN) != 0)); in TEST()
561 memset(state.ptr2, '\2', state.MAX_LEN + state.len[i]); in TEST()
562 state.ptr2[state.MAX_LEN - 1] = '\0'; in TEST()
563 memcpy(state.ptr, state.ptr2, state.MAX_LEN + state.len[i]); in TEST()
575 strlcat(state.ptr2, state.ptr1, state.MAX_LEN + state.len[i]); in TEST()
577 ASSERT_TRUE(memcmp(state.ptr, state.ptr2, state.MAX_LEN + state.len[i]) == 0); in TEST()
598 memset(state.ptr2, 'I', state.MAX_LEN); in TEST()
599 memcpy(state.ptr + state.MAX_LEN, state.ptr2, state.MAX_LEN); in TEST()
608 ASSERT_EQ(strlcpy(state.ptr2, state.ptr1, state.MAX_LEN), strlen(state.ptr1)); in TEST()
610 (memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN) != 0)); in TEST()
621 memset(state.ptr2, '\2', state.MAX_LEN); in TEST()
622 state.ptr2[state.MAX_LEN - 1] = '\0'; in TEST()
623 memcpy(state.ptr, state.ptr2, 2 * state.MAX_LEN); in TEST()
635 ASSERT_TRUE(strncat(state.ptr2, state.ptr1, actual) == state.ptr2); in TEST()
636 ASSERT_EQ(memcmp(state.ptr, state.ptr2, 2 * state.MAX_LEN), 0); in TEST()
646 memset(state.ptr2, 'n', state.MAX_LEN); in TEST()
648 state.ptr2[state.len[i] - 1] = '\0'; in TEST()
654 memcpy(state.ptr1, state.ptr2, state.len[i]); in TEST()
656 actual = strncmp(state.ptr1, state.ptr2, state.len[i]); in TEST()
658 memcpy(state.ptr1, state.ptr2, pos); in TEST()
659 if (state.ptr1[pos] > state.ptr2[pos]) { in TEST()
661 } else if (state.ptr1[pos] == state.ptr2[pos]) { in TEST()
663 state.ptr2[pos + 1] = '\0'; in TEST()
668 actual = strncmp(state.ptr1, state.ptr2, state.len[i]); in TEST()
686 memset(state.ptr2, '\1', state.MAX_LEN); in TEST()
702 ASSERT_EQ(state.ptr2 + expected_end, stpncpy(state.ptr2, state.ptr1, copy_len)); in TEST()
707 ASSERT_EQ(0, memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN)); in TEST()
723 memset(state.ptr2, '\1', state.MAX_LEN); in TEST()
739 ASSERT_EQ(state.ptr2 + expected_end, stpncpy(state.ptr2, state.ptr1, copy_len)); in TEST()
744 ASSERT_EQ(0, memcmp(state.ptr2, state.ptr + state.MAX_LEN, state.MAX_LEN)); in TEST()
835 memset(state.ptr2, c1, state.MAX_LEN); in TEST()
838 state.ptr2[pos] = c2; in TEST()
841 int actual = memcmp(state.ptr1, state.ptr2, state.MAX_LEN); in TEST()
857 wmemset(state.ptr2, c1, state.MAX_LEN); in TEST()
860 state.ptr2[pos] = c2; in TEST()
863 int actual = wmemcmp(state.ptr1, state.ptr2, (size_t) state.MAX_LEN); in TEST()
880 memset(state.ptr2, rand, state.len[i]); in TEST()
881 memset(state.ptr2 + state.len[i], ~rand, state.MAX_LEN - state.len[i]); in TEST()
882 memset(state.ptr2 + pos, '\0', state.len[i]); in TEST()
884 ASSERT_FALSE(memcpy(state.ptr2 + pos, state.ptr1 + pos, state.len[i]) != state.ptr2 + pos); in TEST()
885 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr2, state.MAX_LEN)); in TEST()
896 memcpy(state.ptr2, state.ptr1, state.MAX_LEN); in TEST()
903 ASSERT_TRUE(memset(state.ptr2 + pos, ch, state.len[i]) == state.ptr2 + pos); in TEST()
905 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr2, state.MAX_LEN)); in TEST()
919 memcpy(state.ptr2, state.ptr1, 2 * state.MAX_LEN); in TEST()
923 ASSERT_TRUE(memmove(state.ptr2 + pos, state.ptr2, state.len[i]) == state.ptr2 + pos); in TEST()
924 ASSERT_EQ(0, memcmp(state.ptr2, state.ptr1, 2 * state.MAX_LEN)); in TEST()
943 char* ptr2 = glob_ptr2 + alignments[i]; in TEST() local
946 memcpy(ptr2, ptr1, 2 * len); in TEST()
950 ASSERT_TRUE(memmove(ptr2 + pos, ptr, len) == ptr2 + pos); in TEST()
951 ASSERT_EQ(0, memcmp(ptr2, ptr1, 2 * len)); in TEST()
1014 memcpy(state.ptr2, state.ptr1, 2 * state.MAX_LEN); in TEST()
1017 memcpy(state.ptr2 + start, state.ptr1, state.len[i]); in TEST()
1020 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr2, 2 * state.MAX_LEN)); in TEST()
1033 memcpy(state.ptr2, state.ptr1, start); in TEST()
1034 memset(state.ptr2 + start, '\0', end - start); in TEST()
1035 memcpy(state.ptr2 + end, state.ptr1 + end, state.MAX_LEN - end); in TEST()
1039 ASSERT_EQ(0, memcmp(state.ptr1, state.ptr2, state.MAX_LEN)); in TEST()