Lines Matching refs:check
62 check (int thing, int number) in check() function
75 check (a != NULL && b != NULL && STREQ (a, b), number); in equal()
86 check (strcmp ("", "") == 0, 1); /* Trivial case. */ in test_strcmp()
87 check (strcmp ("a", "a") == 0, 2); /* Identity. */ in test_strcmp()
88 check (strcmp ("abc", "abc") == 0, 3); /* Multicharacter. */ in test_strcmp()
89 check (strcmp ("abc", "abcd") < 0, 4); /* Length mismatches. */ in test_strcmp()
90 check (strcmp ("abcd", "abc") > 0, 5); in test_strcmp()
91 check (strcmp ("abcd", "abce") < 0, 6); /* Honest miscompares. */ in test_strcmp()
92 check (strcmp ("abce", "abcd") > 0, 7); in test_strcmp()
93 check (strcmp ("a\203", "a") > 0, 8); /* Tricky if char signed. */ in test_strcmp()
94 check (strcmp ("a\203", "a\003") > 0, 9); in test_strcmp()
113 check (strcmp (buf1+i,buf2+j) == 0, cnum); in test_strcmp()
116 check (strcmp (buf1+i,buf2+j) > 0, cnum+1); in test_strcmp()
117 check (strcmp (buf2+j,buf1+i) < 0, cnum+2); in test_strcmp()
120 check (strcmp (buf1+i,buf2+j) < 0, cnum+3); in test_strcmp()
121 check (strcmp (buf2+j,buf1+i) > 0, cnum+4); in test_strcmp()
124 check (strcmp (buf1+i,buf2+j) > 0, cnum+5); in test_strcmp()
125 check (strcmp (buf2+j,buf1+i) < 0, cnum+6); in test_strcmp()
140 check (*cp == '0' + (n % 10), ntest); \
141 check (*cp == '\0', ntest); \
149 check (strcpy (one, "abcd") == one, 1); /* Returned value. */ in test_strcpy()
193 check (strcpy (dst, src) == dst, 1); in test_strcpy()
201 check ((stpcpy (one, "a") - one) == 1, 1); in test_stpcpy()
204 check ((stpcpy (one, "ab") - one) == 2, 3); in test_stpcpy()
207 check ((stpcpy (one, "abc") - one) == 3, 5); in test_stpcpy()
210 check ((stpcpy (one, "abcd") - one) == 4, 7); in test_stpcpy()
213 check ((stpcpy (one, "abcde") - one) == 5, 9); in test_stpcpy()
216 check ((stpcpy (one, "abcdef") - one) == 6, 11); in test_stpcpy()
219 check ((stpcpy (one, "abcdefg") - one) == 7, 13); in test_stpcpy()
222 check ((stpcpy (one, "abcdefgh") - one) == 8, 15); in test_stpcpy()
225 check ((stpcpy (one, "abcdefghi") - one) == 9, 17); in test_stpcpy()
228 check ((stpcpy (one, "x") - one) == 1, 19); in test_stpcpy()
232 check ((stpcpy (one, "xx") - one) == 2, 22); in test_stpcpy()
236 check ((stpcpy (one, "xxx") - one) == 3, 25); in test_stpcpy()
240 check ((stpcpy (one, "xxxx") - one) == 4, 28); in test_stpcpy()
244 check ((stpcpy (one, "xxxxx") - one) == 5, 31); in test_stpcpy()
248 check ((stpcpy (one, "xxxxxx") - one) == 6, 34); in test_stpcpy()
252 check ((stpcpy (one, "xxxxxxx") - one) == 7, 37); in test_stpcpy()
256 check ((stpcpy (stpcpy (stpcpy (one, "a"), "b"), "c") - one) == 3, 40); in test_stpcpy()
284 check (stpncpy (one, "abc", 2) == one + 2, 1); in test_stpncpy()
285 check (stpncpy (one, "abc", 3) == one + 3, 2); in test_stpncpy()
286 check (stpncpy (one, "abc", 4) == one + 3, 3); in test_stpncpy()
287 check (one[3] == '\0' && one[4] == 'x', 4); in test_stpncpy()
288 check (stpncpy (one, "abcd", 5) == one + 4, 5); in test_stpncpy()
289 check (one[4] == '\0' && one[5] == 'x', 6); in test_stpncpy()
290 check (stpncpy (one, "abcd", 6) == one + 4, 7); in test_stpncpy()
291 check (one[4] == '\0' && one[5] == '\0' && one[6] == 'x', 8); in test_stpncpy()
299 check (strcat (one, "lmn") == one, 1); /* Returned value. */ in test_strcat()
338 check (strcat (buf1 + n2, buf2 + n1) == buf1 + n2, ntest); in test_strcat()
343 check (buf1[i] == 'b', ntest); in test_strcat()
345 check (buf1[i] == 'a', ntest); in test_strcat()
347 check (buf1[i] == "123"[i - (n2 + n3)], ntest); in test_strcat()
349 check (buf1[i] == '\0', ntest); in test_strcat()
351 check (buf1[i] == 'b', ntest); in test_strcat()
373 check (strncat (one, "lmn", 99) == one, 1); /* Returned value. */ in test_strncat()
426 check (strncat (buf1 + n2, buf2 + n1, ~((size_t) 0) - n4) in test_strncat()
432 check (buf1[i] == 'b', ntest); in test_strncat()
434 check (buf1[i] == 'a', ntest); in test_strncat()
436 check (buf1[i] == "123"[i - (n2 + n3)], ntest); in test_strncat()
438 check (buf1[i] == '\0', ntest); in test_strncat()
440 check (buf1[i] == 'b', ntest); in test_strncat()
460 check (strncmp ("", "", 99) == 0, 1); /* Trivial case. */ in test_strncmp()
461 check (strncmp ("a", "a", 99) == 0, 2); /* Identity. */ in test_strncmp()
462 check (strncmp ("abc", "abc", 99) == 0, 3); /* Multicharacter. */ in test_strncmp()
463 check (strncmp ("abc", "abcd", 99) < 0, 4); /* Length unequal. */ in test_strncmp()
464 check (strncmp ("abcd", "abc", 99) > 0, 5); in test_strncmp()
465 check (strncmp ("abcd", "abce", 99) < 0, 6); /* Honestly unequal. */ in test_strncmp()
466 check (strncmp ("abce", "abcd", 99) > 0, 7); in test_strncmp()
467 check (strncmp ("a\203", "a", 2) > 0, 8); /* Tricky if '\203' < 0 */ in test_strncmp()
468 check (strncmp ("a\203", "a\003", 2) > 0, 9); in test_strncmp()
469 check (strncmp ("abce", "abcd", 3) == 0, 10); /* Count limited. */ in test_strncmp()
470 check (strncmp ("abce", "abc", 3) == 0, 11); /* Count == length. */ in test_strncmp()
471 check (strncmp ("abcd", "abce", 4) < 0, 12); /* Nudging limit. */ in test_strncmp()
472 check (strncmp ("abc", "def", 0) == 0, 13); /* Zero count. */ in test_strncmp()
473 check (strncmp ("abc", "", (size_t)-1) > 0, 14); /* set sign bit in count */ in test_strncmp()
474 check (strncmp ("abc", "abc", (size_t)-2) == 0, 15); in test_strncmp()
482 check (strncpy (one, "abc", 4) == one, 1); /* Returned value. */ in test_strncpy()
523 check (strlen ("") == 0, 1); /* Empty. */ in test_strlen()
524 check (strlen ("a") == 1, 2); /* Single char. */ in test_strlen()
525 check (strlen ("abcd") == 4, 3); /* Multiple chars. */ in test_strlen()
535 check (strlen (p) == 2, 4+i); in test_strlen()
544 check (strnlen ("", 10) == 0, 1); /* Empty. */ in test_strnlen()
545 check (strnlen ("a", 10) == 1, 2); /* Single char. */ in test_strnlen()
546 check (strnlen ("abcd", 10) == 4, 3); /* Multiple chars. */ in test_strnlen()
547 check (strnlen ("foo", (size_t) -1) == 3, 4); /* limits of n. */ in test_strnlen()
548 check (strnlen ("abcd", 0) == 0, 5); /* Restricted. */ in test_strnlen()
549 check (strnlen ("abcd", 1) == 1, 6); /* Restricted. */ in test_strnlen()
550 check (strnlen ("abcd", 2) == 2, 7); /* Restricted. */ in test_strnlen()
551 check (strnlen ("abcd", 3) == 3, 8); /* Restricted. */ in test_strnlen()
552 check (strnlen ("abcd", 4) == 4, 9); /* Restricted. */ in test_strnlen()
560 check (strnlen (p, 100) == 2, 10 + i); in test_strnlen()
568 check (strchr ("abcd", 'z') == NULL, 1); /* Not found. */ in test_strchr()
570 check (strchr (one, 'c') == one+2, 2); /* Basic test. */ in test_strchr()
571 check (strchr (one, 'd') == one+3, 3); /* End of string. */ in test_strchr()
572 check (strchr (one, 'a') == one, 4); /* Beginning. */ in test_strchr()
573 check (strchr (one, '\0') == one+4, 5); /* Finding NUL. */ in test_strchr()
575 check (strchr (one, 'b') == one+1, 6); /* Finding first. */ in test_strchr()
577 check (strchr (one, 'b') == NULL, 7); /* Empty string. */ in test_strchr()
578 check (strchr (one, '\0') == one, 8); /* NUL in empty string. */ in test_strchr()
588 check (strchr (p, '/') == NULL, 9+i); in test_strchr()
599 check (*cp == '\0', 1); /* Not found. */ in test_strchrnul()
600 check (cp == os + 4, 2); in test_strchrnul()
602 check (strchrnul (one, 'c') == one+2, 3); /* Basic test. */ in test_strchrnul()
603 check (strchrnul (one, 'd') == one+3, 4); /* End of string. */ in test_strchrnul()
604 check (strchrnul (one, 'a') == one, 5); /* Beginning. */ in test_strchrnul()
605 check (strchrnul (one, '\0') == one+4, 6); /* Finding NUL. */ in test_strchrnul()
607 check (strchrnul (one, 'b') == one+1, 7); /* Finding first. */ in test_strchrnul()
609 check (strchrnul (one, 'b') == one, 8); /* Empty string. */ in test_strchrnul()
610 check (strchrnul (one, '\0') == one, 9); /* NUL in empty string. */ in test_strchrnul()
621 check (*cp == '\0', 9+2*i); in test_strchrnul()
622 check (cp == p+2, 10+2*i); in test_strchrnul()
632 check (rawmemchr (one, 'c') == one+2, 1); /* Basic test. */ in test_rawmemchr()
633 check (rawmemchr (one, 'd') == one+3, 2); /* End of string. */ in test_rawmemchr()
634 check (rawmemchr (one, 'a') == one, 3); /* Beginning. */ in test_rawmemchr()
635 check (rawmemchr (one, '\0') == one+4, 4); /* Finding NUL. */ in test_rawmemchr()
637 check (rawmemchr (one, 'b') == one+1, 5); /* Finding first. */ in test_rawmemchr()
639 check (rawmemchr (one, '\0') == one, 6); /* NUL in empty string. */ in test_rawmemchr()
649 check (rawmemchr (p, 'R') == p+8, 6+i); in test_rawmemchr()
658 check (index ("abcd", 'z') == NULL, 1); /* Not found. */ in test_index()
660 check (index (one, 'c') == one+2, 2); /* Basic test. */ in test_index()
661 check (index (one, 'd') == one+3, 3); /* End of string. */ in test_index()
662 check (index (one, 'a') == one, 4); /* Beginning. */ in test_index()
663 check (index (one, '\0') == one+4, 5); /* Finding NUL. */ in test_index()
665 check (index (one, 'b') == one+1, 6); /* Finding first. */ in test_index()
667 check (index (one, 'b') == NULL, 7); /* Empty string. */ in test_index()
668 check (index (one, '\0') == one, 8); /* NUL in empty string. */ in test_index()
675 check (strrchr ("abcd", 'z') == NULL, 1); /* Not found. */ in test_strrchr()
677 check (strrchr (one, 'c') == one+2, 2); /* Basic test. */ in test_strrchr()
678 check (strrchr (one, 'd') == one+3, 3); /* End of string. */ in test_strrchr()
679 check (strrchr (one, 'a') == one, 4); /* Beginning. */ in test_strrchr()
680 check (strrchr (one, '\0') == one+4, 5); /* Finding NUL. */ in test_strrchr()
682 check (strrchr (one, 'b') == one+3, 6); /* Finding last. */ in test_strrchr()
684 check (strrchr (one, 'b') == NULL, 7); /* Empty string. */ in test_strrchr()
685 check (strrchr (one, '\0') == one, 8); /* NUL in empty string. */ in test_strrchr()
695 check (strrchr (p, '/') == NULL, 9+i); in test_strrchr()
705 check (memrchr ("abcd", 'z', 5) == NULL, 1); /* Not found. */ in test_memrchr()
708 check (memrchr (one, 'c', l) == one+2, 2); /* Basic test. */ in test_memrchr()
709 check (memrchr (one, 'd', l) == one+3, 3); /* End of string. */ in test_memrchr()
710 check (memrchr (one, 'a', l) == one, 4); /* Beginning. */ in test_memrchr()
711 check (memrchr (one, '\0', l) == one+4, 5); /* Finding NUL. */ in test_memrchr()
714 check (memrchr (one, 'b', l) == one+3, 6); /* Finding last. */ in test_memrchr()
717 check (memrchr (one, 'b', l) == NULL, 7); /* Empty string. */ in test_memrchr()
718 check (memrchr (one, '\0', l) == one, 8); /* NUL in empty string. */ in test_memrchr()
736 check(memrchr(buf + align, 'x', len) == buf + align + pos, n++); in test_memrchr()
737 check(memrchr(buf + align + pos + 1, 'x', len - (pos + 1)) == NULL, in test_memrchr()
750 check (rindex ("abcd", 'z') == NULL, 1); /* Not found. */ in test_rindex()
752 check (rindex (one, 'c') == one+2, 2); /* Basic test. */ in test_rindex()
753 check (rindex (one, 'd') == one+3, 3); /* End of string. */ in test_rindex()
754 check (rindex (one, 'a') == one, 4); /* Beginning. */ in test_rindex()
755 check (rindex (one, '\0') == one+4, 5); /* Finding NUL. */ in test_rindex()
757 check (rindex (one, 'b') == one+3, 6); /* Finding last. */ in test_rindex()
759 check (rindex (one, 'b') == NULL, 7); /* Empty string. */ in test_rindex()
760 check (rindex (one, '\0') == one, 8); /* NUL in empty string. */ in test_rindex()
767 check(strpbrk("abcd", "z") == NULL, 1); /* Not found. */ in test_strpbrk()
769 check(strpbrk(one, "c") == one+2, 2); /* Basic test. */ in test_strpbrk()
770 check(strpbrk(one, "d") == one+3, 3); /* End of string. */ in test_strpbrk()
771 check(strpbrk(one, "a") == one, 4); /* Beginning. */ in test_strpbrk()
772 check(strpbrk(one, "") == NULL, 5); /* Empty search list. */ in test_strpbrk()
773 check(strpbrk(one, "cb") == one+1, 6); /* Multiple search. */ in test_strpbrk()
775 check(strpbrk(one, "b") == one+1, 7); /* Finding first. */ in test_strpbrk()
776 check(strpbrk(one, "cb") == one+1, 8); /* With multiple search. */ in test_strpbrk()
777 check(strpbrk(one, "db") == one+1, 9); /* Another variant. */ in test_strpbrk()
779 check(strpbrk(one, "bc") == NULL, 10); /* Empty string. */ in test_strpbrk()
781 check(strpbrk(one, "bcd") == NULL, 11); /* Empty string. */ in test_strpbrk()
783 check(strpbrk(one, "bcde") == NULL, 12); /* Empty string. */ in test_strpbrk()
784 check(strpbrk(one, "") == NULL, 13); /* Both strings empty. */ in test_strpbrk()
786 check(strpbrk(one, "befg") == one+1, 14); /* Finding first. */ in test_strpbrk()
787 check(strpbrk(one, "cbr") == one+1, 15); /* With multiple search. */ in test_strpbrk()
788 check(strpbrk(one, "db") == one+1, 16); /* Another variant. */ in test_strpbrk()
789 check(strpbrk(one, "efgh") == one+6, 17); /* And yet another. */ in test_strpbrk()
796 check(strstr("abcd", "z") == NULL, 1); /* Not found. */ in test_strstr()
797 check(strstr("abcd", "abx") == NULL, 2); /* Dead end. */ in test_strstr()
799 check(strstr(one, "c") == one+2, 3); /* Basic test. */ in test_strstr()
800 check(strstr(one, "bc") == one+1, 4); /* Multichar. */ in test_strstr()
801 check(strstr(one, "d") == one+3, 5); /* End of string. */ in test_strstr()
802 check(strstr(one, "cd") == one+2, 6); /* Tail of string. */ in test_strstr()
803 check(strstr(one, "abc") == one, 7); /* Beginning. */ in test_strstr()
804 check(strstr(one, "abcd") == one, 8); /* Exact match. */ in test_strstr()
805 check(strstr(one, "abcde") == NULL, 9); /* Too long. */ in test_strstr()
806 check(strstr(one, "de") == NULL, 10); /* Past end. */ in test_strstr()
807 check(strstr(one, "") == one, 11); /* Finding empty. */ in test_strstr()
809 check(strstr(one, "ba") == one+1, 12); /* Finding first. */ in test_strstr()
811 check(strstr(one, "b") == NULL, 13); /* Empty string. */ in test_strstr()
812 check(strstr(one, "") == one, 14); /* Empty in empty string. */ in test_strstr()
814 check(strstr(one, "bca") == one+2, 15); /* False start. */ in test_strstr()
816 check(strstr(one, "bbca") == one+1, 16); /* With overlap. */ in test_strstr()
823 check(strspn("abcba", "abc") == 5, 1); /* Whole string. */ in test_strspn()
824 check(strspn("abcba", "ab") == 2, 2); /* Partial. */ in test_strspn()
825 check(strspn("abc", "qx") == 0, 3); /* None. */ in test_strspn()
826 check(strspn("", "ab") == 0, 4); /* Null string. */ in test_strspn()
827 check(strspn("abc", "") == 0, 5); /* Null search list. */ in test_strspn()
834 check(strcspn("abcba", "qx") == 5, 1); /* Whole string. */ in test_strcspn()
835 check(strcspn("abcba", "cx") == 2, 2); /* Partial. */ in test_strcspn()
836 check(strcspn("abc", "abc") == 0, 3); /* None. */ in test_strcspn()
837 check(strcspn("", "ab") == 0, 4); /* Null string. */ in test_strcspn()
838 check(strcspn("abc", "") == 3, 5); /* Null search list. */ in test_strcspn()
850 check(strtok((char *)NULL, ", ") == NULL, 5); in test_strtok()
853 check(strtok((char *)NULL, ", ") == NULL, 7); in test_strtok()
861 check(strtok((char *)NULL, "-") == NULL, 13); in test_strtok()
867 check(strtok((char *)NULL, ", ") == NULL, 18); in test_strtok()
868 check(strtok((char *)NULL, ", ") == NULL, 19); /* Persistence. */ in test_strtok()
870 check(strtok(one, ", ") == NULL, 20); /* No tokens. */ in test_strtok()
872 check(strtok(one, ", ") == NULL, 21); /* Empty string. */ in test_strtok()
875 check(strtok((char *)NULL, ", ") == NULL, 23); in test_strtok()
878 check(strtok((char *)NULL, "") == NULL, 25); in test_strtok()
884 check(strtok((char *)NULL, ",") == NULL, 29); in test_strtok()
901 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 5); in test_strtok_r()
905 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 7); in test_strtok_r()
915 check(strtok_r((char *)NULL, "-", &cp) == NULL, 13); in test_strtok_r()
922 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 18); in test_strtok_r()
923 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 19); /* Persistence. */ in test_strtok_r()
926 check(strtok_r(one, ", ", &cp) == NULL, 20); /* No tokens. */ in test_strtok_r()
929 check(strtok_r(one, ", ", &cp) == NULL, 21); /* Empty string. */ in test_strtok_r()
930 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 22); /* Persistence. */ in test_strtok_r()
934 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 24); in test_strtok_r()
938 check(strtok_r((char *)NULL, "", &cp) == NULL, 26); in test_strtok_r()
945 check(strtok_r((char *)NULL, ",", &cp) == NULL, 30); in test_strtok_r()
952 check (strtok_r (one, ":", &cp) == NULL, 35); /* Must store pointer in cp. */ in test_strtok_r()
953 check (strtok_r (NULL, ":", &cp) == NULL, 36); in test_strtok_r()
968 check(strsep(&cp, ", ") == NULL, 7); in test_strsep()
975 check(strsep(&cp, ", ") == NULL, 13); in test_strsep()
985 check(strsep(&cp, "-") == NULL, 21); in test_strsep()
996 check(strsep(&cp, ", ") == NULL, 31); in test_strsep()
997 check(strsep(&cp, ", ") == NULL, 32); /* Persistence. */ in test_strsep()
1002 check(strsep(&cp, ", ") == NULL, 36); /* No tokens. */ in test_strsep()
1005 check(strsep(&cp, ", ") == NULL, 38); /* Empty string. */ in test_strsep()
1008 check(strsep(&cp, ", ") == NULL, 40); in test_strsep()
1011 check(strsep(&cp, "") == NULL, 42); in test_strsep()
1017 check(strsep(&cp, ",") == NULL, 46); in test_strsep()
1030 check (strsep (&list, ",") == NULL, 55); in test_strsep()
1041 check(strsep(&cp, ",") == NULL, 63); in test_strsep()
1042 check(strsep(&cp, ",") == NULL, 64); /* Persistence. */ in test_strsep()
1052 check(strsep(&cp, "x,y") == NULL, 72); in test_strsep()
1053 check(strsep(&cp, ",xy") == NULL, 73); /* Persistence. */ in test_strsep()
1060 check(ptr == one + 3, 76); in test_strsep()
1061 check(cp == NULL, 77); in test_strsep()
1068 check(ptr == one + 3, 80); in test_strsep()
1072 check(cp == NULL, 82); in test_strsep()
1078 check(ptr == one, 84); in test_strsep()
1079 check(cp == NULL, 85); in test_strsep()
1085 check(ptr == one , 87); in test_strsep()
1086 check(cp == NULL, 88); in test_strsep()
1097 check(memcmp("a", "a", 1) == 0, cnt++); /* Identity. */ in test_memcmp()
1098 check(memcmp("abc", "abc", 3) == 0, cnt++); /* Multicharacter. */ in test_memcmp()
1099 check(memcmp("abcd", "abcf", 4) < 0, cnt++); /* Honestly unequal. */ in test_memcmp()
1100 check(memcmp("abcf", "abcd", 4) > 0, cnt++); in test_memcmp()
1101 check(memcmp("alph", "cold", 4) < 0, cnt++); in test_memcmp()
1102 check(memcmp("a\203", "a\003", 2) > 0, cnt++); in test_memcmp()
1103 check(memcmp("a\003", "a\203", 2) < 0, cnt++); in test_memcmp()
1104 check(memcmp("a\003bc", "a\203bc", 2) < 0, cnt++); in test_memcmp()
1105 check(memcmp("abc\203", "abc\003", 4) > 0, cnt++); in test_memcmp()
1106 check(memcmp("abc\003", "abc\203", 4) < 0, cnt++); in test_memcmp()
1107 check(memcmp("abcf", "abcd", 3) == 0, cnt++); /* Count limited. */ in test_memcmp()
1108 check(memcmp("abc", "def", 0) == 0, cnt++); /* Zero count. */ in test_memcmp()
1116 check(memcmp(b, a, 16) > 0, cnt++); in test_memcmp()
1117 check(memcmp(a, b, 16) < 0, cnt++); in test_memcmp()
1125 check(memchr("abcd", 'z', 4) == NULL, 1); /* Not found. */ in test_memchr()
1127 check(memchr(one, 'c', 4) == one+2, 2); /* Basic test. */ in test_memchr()
1128 check(memchr(one, ~0xff|'c', 4) == one+2, 2); /* ignore highorder bits. */ in test_memchr()
1129 check(memchr(one, 'd', 4) == one+3, 3); /* End of string. */ in test_memchr()
1130 check(memchr(one, 'a', 4) == one, 4); /* Beginning. */ in test_memchr()
1131 check(memchr(one, '\0', 5) == one+4, 5); /* Finding NUL. */ in test_memchr()
1133 check(memchr(one, 'b', 5) == one+1, 6); /* Finding first. */ in test_memchr()
1134 check(memchr(one, 'b', 0) == NULL, 7); /* Zero count. */ in test_memchr()
1135 check(memchr(one, 'a', 1) == one, 8); /* Singleton case. */ in test_memchr()
1137 check(memchr(one, 0203, 3) == one+1, 9); /* Unsignedness. */ in test_memchr()
1155 check(memchr(buf + align, 'x', len) == buf + align + pos, 10); in test_memchr()
1156 check(memchr(buf + align, 'x', pos) == NULL, 11); in test_memchr()
1169 check(memcpy(one, "abc", 4) == one, 1); /* Returned value. */ in test_memcpy()
1190 check (memcpy (one + i, "hi there", 9) == one + i, in test_memcpy()
1192 check (memcmp (one, x, i) == 0, 8 + (i * 6)); /* Wrote under? */ in test_memcpy()
1194 check (one[i + 9] == 'x', 10 + (i * 6)); /* Wrote over? */ in test_memcpy()
1195 check (memcpy (two, one + i, 9) == two, in test_memcpy()
1206 check(mempcpy(one, "abc", 4) == one + 4, 1); /* Returned value. */ in test_mempcpy()
1227 check (mempcpy (one + i, "hi there", 9) == one + i + 9, in test_mempcpy()
1229 check (memcmp (one, x, i) == 0, 8 + (i * 6)); /* Wrote under? */ in test_mempcpy()
1231 check (one[i + 9] == 'x', 10 + (i * 6)); /* Wrote over? */ in test_mempcpy()
1232 check (mempcpy (two, one + i, 9) == two + 9, in test_mempcpy()
1242 check(memmove(one, "abc", 4) == one, 1); /* Returned value. */ in test_memmove()
1280 check(memccpy(one, "abc", 'q', 4) == NULL, 1); /* Returned value. */ in test_memccpy()
1299 check(memccpy(two, one, 'f', 9) == two+6, 7); /* Returned value. */ in test_memccpy()
1305 check(memccpy(two, one, 'a', 4) == two+1, 10); /* First char. */ in test_memccpy()
1307 check(memccpy(two, one, 'd', 4) == two+4, 12); /* Last char. */ in test_memccpy()
1310 check(memccpy(two, one, 'x', 1) == two+1, 14); /* Singleton. */ in test_memccpy()
1321 check(memset(one+1, 'x', 3) == one+1, 1); /* Return value. */ in test_memset()
1337 check (one[i] == '\01', 7); in test_memset()
1371 check (0, 8 + i + j * 256 + (c != 0) * 256 * 256); in test_memset()
1421 check(p != NULL, 1); in test_strndup()
1426 check(q != NULL, 3); in test_strndup()
1433 check(p != NULL, 5); in test_strndup()
1443 check(bcmp("a", "a", 1) == 0, 1); /* Identity. */ in test_bcmp()
1444 check(bcmp("abc", "abc", 3) == 0, 2); /* Multicharacter. */ in test_bcmp()
1445 check(bcmp("abcd", "abce", 4) != 0, 3); /* Honestly unequal. */ in test_bcmp()
1446 check(bcmp("abce", "abcd", 4) != 0, 4); in test_bcmp()
1447 check(bcmp("alph", "beta", 4) != 0, 5); in test_bcmp()
1448 check(bcmp("abce", "abcd", 3) == 0, 6); /* Count limited. */ in test_bcmp()
1449 check(bcmp("abc", "def", 0) == 0, 8); /* Zero count. */ in test_bcmp()
1456 check (__memcmpeq ("a", "a", 1) == 0, 1); /* Identity. */ in test_memcmpeq()
1457 check (__memcmpeq ("abc", "abc", 3) == 0, 2); /* Multicharacter. */ in test_memcmpeq()
1458 check (__memcmpeq ("abcd", "abce", 4) != 0, 3); /* Honestly unequal. */ in test_memcmpeq()
1459 check (__memcmpeq ("abce", "abcd", 4) != 0, 4); in test_memcmpeq()
1460 check (__memcmpeq ("alph", "beta", 4) != 0, 5); in test_memcmpeq()
1461 check (__memcmpeq ("abce", "abcd", 3) == 0, 6); /* Count limited. */ in test_memcmpeq()
1462 check (__memcmpeq ("abc", "def", 0) == 0, 8); /* Zero count. */ in test_memcmpeq()
1469 check(strerror(EDOM) != 0, 1); in test_strerror()
1470 check(strerror(ERANGE) != 0, 2); in test_strerror()
1471 check(strerror(ENOENT) != 0, 3); in test_strerror()
1479 check(strcasecmp("a", "a") == 0, 1); in test_strcasecmp()
1480 check(strcasecmp("a", "A") == 0, 2); in test_strcasecmp()
1481 check(strcasecmp("A", "a") == 0, 3); in test_strcasecmp()
1482 check(strcasecmp("a", "b") < 0, 4); in test_strcasecmp()
1483 check(strcasecmp("c", "b") > 0, 5); in test_strcasecmp()
1484 check(strcasecmp("abc", "AbC") == 0, 6); in test_strcasecmp()
1485 check(strcasecmp("0123456789", "0123456789") == 0, 7); in test_strcasecmp()
1486 check(strcasecmp("", "0123456789") < 0, 8); in test_strcasecmp()
1487 check(strcasecmp("AbC", "") > 0, 9); in test_strcasecmp()
1488 check(strcasecmp("AbC", "A") > 0, 10); in test_strcasecmp()
1489 check(strcasecmp("AbC", "Ab") > 0, 11); in test_strcasecmp()
1490 check(strcasecmp("AbC", "ab") > 0, 12); in test_strcasecmp()
1498 check(strncasecmp("a", "a", 5) == 0, 1); in test_strncasecmp()
1499 check(strncasecmp("a", "A", 5) == 0, 2); in test_strncasecmp()
1500 check(strncasecmp("A", "a", 5) == 0, 3); in test_strncasecmp()
1501 check(strncasecmp("a", "b", 5) < 0, 4); in test_strncasecmp()
1502 check(strncasecmp("c", "b", 5) > 0, 5); in test_strncasecmp()
1503 check(strncasecmp("abc", "AbC", 5) == 0, 6); in test_strncasecmp()
1504 check(strncasecmp("0123456789", "0123456789", 10) == 0, 7); in test_strncasecmp()
1505 check(strncasecmp("", "0123456789", 10) < 0, 8); in test_strncasecmp()
1506 check(strncasecmp("AbC", "", 5) > 0, 9); in test_strncasecmp()
1507 check(strncasecmp("AbC", "A", 5) > 0, 10); in test_strncasecmp()
1508 check(strncasecmp("AbC", "Ab", 5) > 0, 11); in test_strncasecmp()
1509 check(strncasecmp("AbC", "ab", 5) > 0, 12); in test_strncasecmp()
1510 check(strncasecmp("0123456789", "AbC", 0) == 0, 13); in test_strncasecmp()
1511 check(strncasecmp("AbC", "abc", 1) == 0, 14); in test_strncasecmp()
1512 check(strncasecmp("AbC", "abc", 2) == 0, 15); in test_strncasecmp()
1513 check(strncasecmp("AbC", "abc", 3) == 0, 16); in test_strncasecmp()
1514 check(strncasecmp("AbC", "abcd", 3) == 0, 17); in test_strncasecmp()
1515 check(strncasecmp("AbC", "abcd", 4) < 0, 18); in test_strncasecmp()
1516 check(strncasecmp("ADC", "abcd", 1) == 0, 19); in test_strncasecmp()
1517 check(strncasecmp("ADC", "abcd", 2) > 0, 20); in test_strncasecmp()