• Home
  • Raw
  • Download

Lines Matching refs:pos

448       size_t pos = random() % state.MAX_LEN;  in TEST()  local
450 if (pos >= state.len[i] - 1) { in TEST()
457 state.ptr1[pos] = seek_char; in TEST()
458 expected = state.ptr1 + pos; in TEST()
482 size_t pos = 1 + (random() % (state.MAX_LEN - 1)); in TEST() local
485 if (pos >= state.len[i] - 1) { 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()
494 state.ptr1[pos + 1] = '\0'; in TEST()
495 state.ptr2[pos + 1] = '\0'; in TEST()
511 size_t pos = random() % state.MAX_LEN; in TEST() local
513 memset(state.ptr1, '\2', pos); in TEST()
514 state.ptr1[pos] = '\0'; in TEST()
523 memcpy(state.ptr + state.MAX_LEN, state.ptr1, pos + 1); in TEST()
535 size_t pos = random() % state.MAX_LEN; in TEST() local
537 memset(state.ptr1, '\2', pos); in TEST()
538 state.ptr1[pos] = '\0'; in TEST()
547 memcpy(state.ptr + state.MAX_LEN, state.ptr1, pos + 1); in TEST()
565 size_t pos = random() % state.MAX_LEN; in TEST() local
566 memset(state.ptr1, '\3', pos); in TEST()
567 state.ptr1[pos] = '\0'; in TEST()
568 if (pos < state.len[i]) { in TEST()
569 memcpy(state.ptr + state.MAX_LEN - 1, state.ptr1, pos + 1); in TEST()
592 size_t pos = random() % state.MAX_LEN; in TEST() local
593 if (pos < state.MAX_LEN) { in TEST()
594 state.ptr1[pos] = '\0'; in TEST()
601 if (pos > state.MAX_LEN - 1) { in TEST()
605 memcpy(state.ptr + state.MAX_LEN, state.ptr1, pos + 1); in TEST()
629 size_t pos = strlen(state.ptr1); in TEST() local
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()
650 size_t pos = 1 + (random() % (state.MAX_LEN - 1)); in TEST() local
653 if (pos >= state.len[i] - 1) { 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()
662 state.ptr1[pos + 1] = '\0'; in TEST()
663 state.ptr2[pos + 1] = '\0'; in TEST()
760 size_t pos = random() % state.MAX_LEN; in TEST() local
762 if (pos >= state.len[i] - 1) { in TEST()
769 state.ptr1[pos] = seek_char; in TEST()
770 expected = state.ptr1 + pos; in TEST()
785 size_t pos = random() % state.MAX_LEN; in TEST() local
787 if (pos >= state.len[i]) { in TEST()
790 state.ptr1[pos] = seek_char; in TEST()
791 expected = state.ptr1 + pos; in TEST()
814 size_t pos = random() % state.MAX_LEN; in TEST() local
816 if (pos >= state.len[i]) { in TEST()
819 state.ptr1[pos] = seek_char; in TEST()
820 expected = state.ptr1 + pos; in TEST()
837 int pos = (state.len[i] == 0) ? 0 : (random() % state.len[i]); in TEST() local
838 state.ptr2[pos] = c2; in TEST()
859 int pos = (state.len[i] == 0) ? 0 : (random() % state.len[i]); in TEST() local
860 state.ptr2[pos] = c2; in TEST()
875 size_t pos = random() % (state.MAX_LEN - state.len[i]); in TEST() local
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()
898 size_t pos = random () % (state.MAX_LEN - state.len[i]); in TEST() local
899 for (size_t k = pos; k < pos + state.len[i]; k++) { in TEST()
903 ASSERT_TRUE(memset(state.ptr2 + pos, ch, state.len[i]) == state.ptr2 + pos); in TEST()
916 size_t pos = random() % (state.MAX_LEN - state.len[i]); in TEST() local
921 memcpy(state.ptr1 + pos, state.ptr, state.len[i]); in TEST()
923 ASSERT_TRUE(memmove(state.ptr2 + pos, state.ptr2, state.len[i]) == state.ptr2 + pos); in TEST()
936 size_t pos = 64; in TEST() local
948 memcpy(ptr1 + pos, ptr, len); in TEST()
950 ASSERT_TRUE(memmove(ptr2 + pos, ptr, len) == ptr2 + pos); in TEST()