Lines Matching refs:check
49 check (int thing, int number) in check() function
62 check(a != NULL && b != NULL && STREQ (a, b), number); in equal()
73 check (strcmp ("", "") == 0, 1); /* Trivial case. */ in test_strcmp()
74 check (strcmp ("a", "a") == 0, 2); /* Identity. */ in test_strcmp()
75 check (strcmp ("abc", "abc") == 0, 3); /* Multicharacter. */ in test_strcmp()
76 check (strcmp ("abc", "abcd") < 0, 4); /* Length mismatches. */ in test_strcmp()
77 check (strcmp ("abcd", "abc") > 0, 5); in test_strcmp()
78 check (strcmp ("abcd", "abce") < 0, 6); /* Honest miscompares. */ in test_strcmp()
79 check (strcmp ("abce", "abcd") > 0, 7); in test_strcmp()
80 check (strcmp ("a\203", "a") > 0, 8); /* Tricky if char signed. */ in test_strcmp()
81 check (strcmp ("a\203", "a\003") > 0, 9); in test_strcmp()
100 check (strcmp (buf1+i,buf2+j) == 0, cnum); in test_strcmp()
103 check (strcmp (buf1+i,buf2+j) > 0, cnum+1); in test_strcmp()
104 check (strcmp (buf2+j,buf1+i) < 0, cnum+2); in test_strcmp()
107 check (strcmp (buf1+i,buf2+j) < 0, cnum+3); in test_strcmp()
108 check (strcmp (buf2+j,buf1+i) > 0, cnum+4); in test_strcmp()
111 check (strcmp (buf1+i,buf2+j) > 0, cnum+5); in test_strcmp()
112 check (strcmp (buf2+j,buf1+i) < 0, cnum+6); in test_strcmp()
127 check (*cp == '0' + (n % 10), ntest); \
128 check (*cp == '\0', ntest); \
136 check (strcpy (one, "abcd") == one, 1); /* Returned value. */ in test_strcpy()
180 check (strcpy (dst, src) == dst, 1); in test_strcpy()
189 check ((stpcpy (one, "a") - one) == 1, 1); in test_stpcpy()
192 check ((stpcpy (one, "ab") - one) == 2, 3); in test_stpcpy()
195 check ((stpcpy (one, "abc") - one) == 3, 5); in test_stpcpy()
198 check ((stpcpy (one, "abcd") - one) == 4, 7); in test_stpcpy()
201 check ((stpcpy (one, "abcde") - one) == 5, 9); in test_stpcpy()
204 check ((stpcpy (one, "abcdef") - one) == 6, 11); in test_stpcpy()
207 check ((stpcpy (one, "abcdefg") - one) == 7, 13); in test_stpcpy()
210 check ((stpcpy (one, "abcdefgh") - one) == 8, 15); in test_stpcpy()
213 check ((stpcpy (one, "abcdefghi") - one) == 9, 17); in test_stpcpy()
216 check ((stpcpy (one, "x") - one) == 1, 19); in test_stpcpy()
220 check ((stpcpy (one, "xx") - one) == 2, 22); in test_stpcpy()
224 check ((stpcpy (one, "xxx") - one) == 3, 25); in test_stpcpy()
228 check ((stpcpy (one, "xxxx") - one) == 4, 28); in test_stpcpy()
232 check ((stpcpy (one, "xxxxx") - one) == 5, 31); in test_stpcpy()
236 check ((stpcpy (one, "xxxxxx") - one) == 6, 34); in test_stpcpy()
240 check ((stpcpy (one, "xxxxxxx") - one) == 7, 37); in test_stpcpy()
244 check ((stpcpy (stpcpy (stpcpy (one, "a"), "b"), "c") - one) == 3, 40); in test_stpcpy()
274 check (stpncpy (one, "abc", 2) == one + 2, 1); in test_stpncpy()
275 check (stpncpy (one, "abc", 3) == one + 3, 2); in test_stpncpy()
276 check (stpncpy (one, "abc", 4) == one + 3, 3); in test_stpncpy()
277 check (one[3] == '\0' && one[4] == 'x', 4); in test_stpncpy()
278 check (stpncpy (one, "abcd", 5) == one + 4, 5); in test_stpncpy()
279 check (one[4] == '\0' && one[5] == 'x', 6); in test_stpncpy()
280 check (stpncpy (one, "abcd", 6) == one + 4, 7); in test_stpncpy()
281 check (one[4] == '\0' && one[5] == '\0' && one[6] == 'x', 8); in test_stpncpy()
290 check (strcat (one, "lmn") == one, 1); /* Returned value. */ in test_strcat()
322 check (strncat (one, "lmn", 99) == one, 1); /* Returned value. */ in test_strncat()
362 check (strncmp ("", "", 99) == 0, 1); /* Trivial case. */ in test_strncmp()
363 check (strncmp ("a", "a", 99) == 0, 2); /* Identity. */ in test_strncmp()
364 check (strncmp ("abc", "abc", 99) == 0, 3); /* Multicharacter. */ in test_strncmp()
365 check (strncmp ("abc", "abcd", 99) < 0, 4); /* Length unequal. */ in test_strncmp()
366 check (strncmp ("abcd", "abc", 99) > 0, 5); in test_strncmp()
367 check (strncmp ("abcd", "abce", 99) < 0, 6); /* Honestly unequal. */ in test_strncmp()
368 check (strncmp ("abce", "abcd", 99) > 0, 7); in test_strncmp()
369 check (strncmp ("a\203", "a", 2) > 0, 8); /* Tricky if '\203' < 0 */ in test_strncmp()
370 check (strncmp ("a\203", "a\003", 2) > 0, 9); in test_strncmp()
371 check (strncmp ("abce", "abcd", 3) == 0, 10); /* Count limited. */ in test_strncmp()
372 check (strncmp ("abce", "abc", 3) == 0, 11); /* Count == length. */ in test_strncmp()
373 check (strncmp ("abcd", "abce", 4) < 0, 12); /* Nudging limit. */ in test_strncmp()
374 check (strncmp ("abc", "def", 0) == 0, 13); /* Zero count. */ in test_strncmp()
382 check (strncpy (one, "abc", 4) == one, 1); /* Returned value. */ in test_strncpy()
423 check (strlen ("") == 0, 1); /* Empty. */ in test_strlen()
424 check (strlen ("a") == 1, 2); /* Single char. */ in test_strlen()
425 check (strlen ("abcd") == 4, 3); /* Multiple chars. */ in test_strlen()
435 check (strlen (p) == 2, 4+i); in test_strlen()
444 check (strchr ("abcd", 'z') == NULL, 1); /* Not found. */ in test_strchr()
446 check (strchr (one, 'c') == one+2, 2); /* Basic test. */ in test_strchr()
447 check (strchr (one, 'd') == one+3, 3); /* End of string. */ in test_strchr()
448 check (strchr (one, 'a') == one, 4); /* Beginning. */ in test_strchr()
449 check (strchr (one, '\0') == one+4, 5); /* Finding NUL. */ in test_strchr()
451 check (strchr (one, 'b') == one+1, 6); /* Finding first. */ in test_strchr()
453 check (strchr (one, 'b') == NULL, 7); /* Empty string. */ in test_strchr()
454 check (strchr (one, '\0') == one, 8); /* NUL in empty string. */ in test_strchr()
464 check (strchr (p, '/') == NULL, 9+i); in test_strchr()
477 check (*cp == '\0', 1); /* Not found. */ in test_strchrnul()
478 check (cp == os + 4, 2); in test_strchrnul()
480 check (strchrnul (one, 'c') == one+2, 3); /* Basic test. */ in test_strchrnul()
481 check (strchrnul (one, 'd') == one+3, 4); /* End of string. */ in test_strchrnul()
482 check (strchrnul (one, 'a') == one, 5); /* Beginning. */ in test_strchrnul()
483 check (strchrnul (one, '\0') == one+4, 6); /* Finding NUL. */ in test_strchrnul()
485 check (strchrnul (one, 'b') == one+1, 7); /* Finding first. */ in test_strchrnul()
487 check (strchrnul (one, 'b') == one, 8); /* Empty string. */ in test_strchrnul()
488 check (strchrnul (one, '\0') == one, 9); /* NUL in empty string. */ in test_strchrnul()
499 check (*cp == '\0', 9+2*i); in test_strchrnul()
500 check (cp == p+2, 10+2*i); in test_strchrnul()
513 check (rawmemchr (one, 'c') == one+2, 1); /* Basic test. */ in test_rawmemchr()
514 check (rawmemchr (one, 'd') == one+3, 2); /* End of string. */ in test_rawmemchr()
515 check (rawmemchr (one, 'a') == one, 3); /* Beginning. */ in test_rawmemchr()
516 check (rawmemchr (one, '\0') == one+4, 4); /* Finding NUL. */ in test_rawmemchr()
518 check (rawmemchr (one, 'b') == one+1, 5); /* Finding first. */ in test_rawmemchr()
520 check (rawmemchr (one, '\0') == one, 6); /* NUL in empty string. */ in test_rawmemchr()
530 check (rawmemchr (p, 'R') == p+8, 6+i); in test_rawmemchr()
540 check (index ("abcd", 'z') == NULL, 1); /* Not found. */ in test_index()
542 check (index (one, 'c') == one+2, 2); /* Basic test. */ in test_index()
543 check (index (one, 'd') == one+3, 3); /* End of string. */ in test_index()
544 check (index (one, 'a') == one, 4); /* Beginning. */ in test_index()
545 check (index (one, '\0') == one+4, 5); /* Finding NUL. */ in test_index()
547 check (index (one, 'b') == one+1, 6); /* Finding first. */ in test_index()
549 check (index (one, 'b') == NULL, 7); /* Empty string. */ in test_index()
550 check (index (one, '\0') == one, 8); /* NUL in empty string. */ in test_index()
557 check (strrchr ("abcd", 'z') == NULL, 1); /* Not found. */ in test_strrchr()
559 check (strrchr (one, 'c') == one+2, 2); /* Basic test. */ in test_strrchr()
560 check (strrchr (one, 'd') == one+3, 3); /* End of string. */ in test_strrchr()
561 check (strrchr (one, 'a') == one, 4); /* Beginning. */ in test_strrchr()
562 check (strrchr (one, '\0') == one+4, 5); /* Finding NUL. */ in test_strrchr()
564 check (strrchr (one, 'b') == one+3, 6); /* Finding last. */ in test_strrchr()
566 check (strrchr (one, 'b') == NULL, 7); /* Empty string. */ in test_strrchr()
567 check (strrchr (one, '\0') == one, 8); /* NUL in empty string. */ in test_strrchr()
577 check (strrchr (p, '/') == NULL, 9+i); in test_strrchr()
589 check (memrchr ("abcd", 'z', 5) == NULL, 1); /* Not found. */ in test_memrchr()
592 check (memrchr (one, 'c', l) == one+2, 2); /* Basic test. */ in test_memrchr()
593 check (memrchr (one, 'd', l) == one+3, 3); /* End of string. */ in test_memrchr()
594 check (memrchr (one, 'a', l) == one, 4); /* Beginning. */ in test_memrchr()
595 check (memrchr (one, '\0', l) == one+4, 5); /* Finding NUL. */ in test_memrchr()
598 check (memrchr (one, 'b', l) == one+3, 6); /* Finding last. */ in test_memrchr()
601 check (memrchr (one, 'b', l) == NULL, 7); /* Empty string. */ in test_memrchr()
602 check (memrchr (one, '\0', l) == one, 8); /* NUL in empty string. */ in test_memrchr()
620 check(memrchr(buf + align, 'x', len) == buf + align + pos, 9); in test_memrchr()
621 check(memrchr(buf + align + pos + 1, 'x', len - (pos + 1)) == NULL, in test_memrchr()
635 check (rindex ("abcd", 'z') == NULL, 1); /* Not found. */ in test_rindex()
637 check (rindex (one, 'c') == one+2, 2); /* Basic test. */ in test_rindex()
638 check (rindex (one, 'd') == one+3, 3); /* End of string. */ in test_rindex()
639 check (rindex (one, 'a') == one, 4); /* Beginning. */ in test_rindex()
640 check (rindex (one, '\0') == one+4, 5); /* Finding NUL. */ in test_rindex()
642 check (rindex (one, 'b') == one+3, 6); /* Finding last. */ in test_rindex()
644 check (rindex (one, 'b') == NULL, 7); /* Empty string. */ in test_rindex()
645 check (rindex (one, '\0') == one, 8); /* NUL in empty string. */ in test_rindex()
652 check(strpbrk("abcd", "z") == NULL, 1); /* Not found. */ in test_strpbrk()
654 check(strpbrk(one, "c") == one+2, 2); /* Basic test. */ in test_strpbrk()
655 check(strpbrk(one, "d") == one+3, 3); /* End of string. */ in test_strpbrk()
656 check(strpbrk(one, "a") == one, 4); /* Beginning. */ in test_strpbrk()
657 check(strpbrk(one, "") == NULL, 5); /* Empty search list. */ in test_strpbrk()
658 check(strpbrk(one, "cb") == one+1, 6); /* Multiple search. */ in test_strpbrk()
660 check(strpbrk(one, "b") == one+1, 7); /* Finding first. */ in test_strpbrk()
661 check(strpbrk(one, "cb") == one+1, 8); /* With multiple search. */ in test_strpbrk()
662 check(strpbrk(one, "db") == one+1, 9); /* Another variant. */ in test_strpbrk()
664 check(strpbrk(one, "bc") == NULL, 10); /* Empty string. */ in test_strpbrk()
666 check(strpbrk(one, "bcd") == NULL, 11); /* Empty string. */ in test_strpbrk()
668 check(strpbrk(one, "bcde") == NULL, 12); /* Empty string. */ in test_strpbrk()
669 check(strpbrk(one, "") == NULL, 13); /* Both strings empty. */ in test_strpbrk()
671 check(strpbrk(one, "befg") == one+1, 14); /* Finding first. */ in test_strpbrk()
672 check(strpbrk(one, "cbr") == one+1, 15); /* With multiple search. */ in test_strpbrk()
673 check(strpbrk(one, "db") == one+1, 16); /* Another variant. */ in test_strpbrk()
674 check(strpbrk(one, "efgh") == one+6, 17); /* And yet another. */ in test_strpbrk()
681 check(strstr("abcd", "z") == NULL, 1); /* Not found. */ in test_strstr()
682 check(strstr("abcd", "abx") == NULL, 2); /* Dead end. */ in test_strstr()
684 check(strstr(one, "c") == one+2, 3); /* Basic test. */ in test_strstr()
685 check(strstr(one, "bc") == one+1, 4); /* Multichar. */ in test_strstr()
686 check(strstr(one, "d") == one+3, 5); /* End of string. */ in test_strstr()
687 check(strstr(one, "cd") == one+2, 6); /* Tail of string. */ in test_strstr()
688 check(strstr(one, "abc") == one, 7); /* Beginning. */ in test_strstr()
689 check(strstr(one, "abcd") == one, 8); /* Exact match. */ in test_strstr()
690 check(strstr(one, "abcde") == NULL, 9); /* Too long. */ in test_strstr()
691 check(strstr(one, "de") == NULL, 10); /* Past end. */ in test_strstr()
692 check(strstr(one, "") == one, 11); /* Finding empty. */ in test_strstr()
694 check(strstr(one, "ba") == one+1, 12); /* Finding first. */ in test_strstr()
696 check(strstr(one, "b") == NULL, 13); /* Empty string. */ in test_strstr()
697 check(strstr(one, "") == one, 14); /* Empty in empty string. */ in test_strstr()
699 check(strstr(one, "bca") == one+2, 15); /* False start. */ in test_strstr()
701 check(strstr(one, "bbca") == one+1, 16); /* With overlap. */ in test_strstr()
708 check(strspn("abcba", "abc") == 5, 1); /* Whole string. */ in test_strspn()
709 check(strspn("abcba", "ab") == 2, 2); /* Partial. */ in test_strspn()
710 check(strspn("abc", "qx") == 0, 3); /* None. */ in test_strspn()
711 check(strspn("", "ab") == 0, 4); /* Null string. */ in test_strspn()
712 check(strspn("abc", "") == 0, 5); /* Null search list. */ in test_strspn()
719 check(strcspn("abcba", "qx") == 5, 1); /* Whole string. */ in test_strcspn()
720 check(strcspn("abcba", "cx") == 2, 2); /* Partial. */ in test_strcspn()
721 check(strcspn("abc", "abc") == 0, 3); /* None. */ in test_strcspn()
722 check(strcspn("", "ab") == 0, 4); /* Null string. */ in test_strcspn()
723 check(strcspn("abc", "") == 3, 5); /* Null search list. */ in test_strcspn()
735 check(strtok((char *)NULL, ", ") == NULL, 5); in test_strtok()
738 check(strtok((char *)NULL, ", ") == NULL, 7); in test_strtok()
746 check(strtok((char *)NULL, "-") == NULL, 13); in test_strtok()
752 check(strtok((char *)NULL, ", ") == NULL, 18); in test_strtok()
753 check(strtok((char *)NULL, ", ") == NULL, 19); /* Persistence. */ in test_strtok()
755 check(strtok(one, ", ") == NULL, 20); /* No tokens. */ in test_strtok()
757 check(strtok(one, ", ") == NULL, 21); /* Empty string. */ in test_strtok()
760 check(strtok((char *)NULL, ", ") == NULL, 23); in test_strtok()
763 check(strtok((char *)NULL, "") == NULL, 25); in test_strtok()
769 check(strtok((char *)NULL, ",") == NULL, 29); in test_strtok()
786 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 5); in test_strtok_r()
790 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 7); in test_strtok_r()
800 check(strtok_r((char *)NULL, "-", &cp) == NULL, 13); in test_strtok_r()
807 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 18); in test_strtok_r()
808 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 19); /* Persistence. */ in test_strtok_r()
811 check(strtok_r(one, ", ", &cp) == NULL, 20); /* No tokens. */ in test_strtok_r()
814 check(strtok_r(one, ", ", &cp) == NULL, 21); /* Empty string. */ in test_strtok_r()
815 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 22); /* Persistence. */ in test_strtok_r()
819 check(strtok_r((char *)NULL, ", ", &cp) == NULL, 24); in test_strtok_r()
823 check(strtok_r((char *)NULL, "", &cp) == NULL, 26); in test_strtok_r()
830 check(strtok_r((char *)NULL, ",", &cp) == NULL, 30); in test_strtok_r()
849 check(strsep(&cp, ", ") == NULL, 7); in test_strsep()
856 check(strsep(&cp, ", ") == NULL, 13); in test_strsep()
866 check(strsep(&cp, "-") == NULL, 21); in test_strsep()
877 check(strsep(&cp, ", ") == NULL, 31); in test_strsep()
878 check(strsep(&cp, ", ") == NULL, 32); /* Persistence. */ in test_strsep()
883 check(strsep(&cp, ", ") == NULL, 36); /* No tokens. */ in test_strsep()
886 check(strsep(&cp, ", ") == NULL, 38); /* Empty string. */ in test_strsep()
889 check(strsep(&cp, ", ") == NULL, 40); in test_strsep()
892 check(strsep(&cp, "") == NULL, 42); in test_strsep()
898 check(strsep(&cp, ",") == NULL, 46); in test_strsep()
912 check (strsep (&list, ",") == NULL, 55); in test_strsep()
924 check(strsep(&cp, ",") == NULL, 63); in test_strsep()
925 check(strsep(&cp, ",") == NULL, 64); /* Persistence. */ in test_strsep()
935 check(strsep(&cp, "x,y") == NULL, 72); in test_strsep()
936 check(strsep(&cp, ",xy") == NULL, 73); /* Persistence. */ in test_strsep()
943 check(ptr == one + 3, 76); in test_strsep()
944 check(cp == NULL, 77); in test_strsep()
951 check(ptr == one + 3, 80); in test_strsep()
955 check(cp == NULL, 82); in test_strsep()
961 check(ptr == one, 84); in test_strsep()
962 check(cp == NULL, 85); in test_strsep()
968 check(ptr == one , 87); in test_strsep()
969 check(cp == NULL, 88); in test_strsep()
976 check(memcmp("a", "a", 1) == 0, 1); /* Identity. */ in test_memcmp()
977 check(memcmp("abc", "abc", 3) == 0, 2); /* Multicharacter. */ in test_memcmp()
978 check(memcmp("abcd", "abce", 4) < 0, 3); /* Honestly unequal. */ in test_memcmp()
979 check(memcmp("abce", "abcd", 4) > 0, 4); in test_memcmp()
980 check(memcmp("alph", "beta", 4) < 0, 5); in test_memcmp()
981 check(memcmp("a\203", "a\003", 2) > 0, 6); in test_memcmp()
982 check(memcmp("abce", "abcd", 3) == 0, 7); /* Count limited. */ in test_memcmp()
983 check(memcmp("abc", "def", 0) == 0, 8); /* Zero count. */ in test_memcmp()
990 check(memchr("abcd", 'z', 4) == NULL, 1); /* Not found. */ in test_memchr()
992 check(memchr(one, 'c', 4) == one+2, 2); /* Basic test. */ in test_memchr()
993 check(memchr(one, ~0xff|'c', 4) == one+2, 2); /* ignore highorder bits. */ in test_memchr()
994 check(memchr(one, 'd', 4) == one+3, 3); /* End of string. */ in test_memchr()
995 check(memchr(one, 'a', 4) == one, 4); /* Beginning. */ in test_memchr()
996 check(memchr(one, '\0', 5) == one+4, 5); /* Finding NUL. */ in test_memchr()
998 check(memchr(one, 'b', 5) == one+1, 6); /* Finding first. */ in test_memchr()
999 check(memchr(one, 'b', 0) == NULL, 7); /* Zero count. */ in test_memchr()
1000 check(memchr(one, 'a', 1) == one, 8); /* Singleton case. */ in test_memchr()
1002 check(memchr(one, 0203, 3) == one+1, 9); /* Unsignedness. */ in test_memchr()
1020 check(memchr(buf + align, 'x', len) == buf + align + pos, 10); in test_memchr()
1021 check(memchr(buf + align, 'x', pos) == NULL, 11); in test_memchr()
1034 check(memcpy(one, "abc", 4) == one, 1); /* Returned value. */ in test_memcpy()
1055 check (memcpy (one + i, "hi there", 9) == one + i, in test_memcpy()
1057 check (memcmp (one, x, i) == 0, 8 + (i * 6)); /* Wrote under? */ in test_memcpy()
1059 check (one[i + 9] == 'x', 10 + (i * 6)); /* Wrote over? */ in test_memcpy()
1060 check (memcpy (two, one + i, 9) == two, in test_memcpy()
1072 check(mempcpy(one, "abc", 4) == one + 4, 1); /* Returned value. */ in test_mempcpy()
1093 check (mempcpy (one + i, "hi there", 9) == one + i + 9, in test_mempcpy()
1095 check (memcmp (one, x, i) == 0, 8 + (i * 6)); /* Wrote under? */ in test_mempcpy()
1097 check (one[i + 9] == 'x', 10 + (i * 6)); /* Wrote over? */ in test_mempcpy()
1098 check (mempcpy (two, one + i, 9) == two + 9, in test_mempcpy()
1109 check(memmove(one, "abc", 4) == one, 1); /* Returned value. */ in test_memmove()
1147 check(memccpy(one, "abc", 'q', 4) == NULL, 1); /* Returned value. */ in test_memccpy()
1166 check(memccpy(two, one, 'f', 9) == two+6, 7); /* Returned value. */ in test_memccpy()
1172 check(memccpy(two, one, 'a', 4) == two+1, 10); /* First char. */ in test_memccpy()
1174 check(memccpy(two, one, 'd', 4) == two+4, 12); /* Last char. */ in test_memccpy()
1177 check(memccpy(two, one, 'x', 1) == two+1, 14); /* Singleton. */ in test_memccpy()
1188 check(memset(one+1, 'x', 3) == one+1, 1); /* Return value. */ in test_memset()
1204 check (one[i] == '\01', 7); in test_memset()
1238 check (0, 8 + i + j * 256 + (c != 0) * 256 * 256); in test_memset()
1289 check(p != NULL, 1); in test_strndup()
1294 check(q != NULL, 3); in test_strndup()
1301 check(p != NULL, 5); in test_strndup()
1312 check(bcmp("a", "a", 1) == 0, 1); /* Identity. */ in test_bcmp()
1313 check(bcmp("abc", "abc", 3) == 0, 2); /* Multicharacter. */ in test_bcmp()
1314 check(bcmp("abcd", "abce", 4) != 0, 3); /* Honestly unequal. */ in test_bcmp()
1315 check(bcmp("abce", "abcd", 4) != 0, 4); in test_bcmp()
1316 check(bcmp("alph", "beta", 4) != 0, 5); in test_bcmp()
1317 check(bcmp("abce", "abcd", 3) == 0, 6); /* Count limited. */ in test_bcmp()
1318 check(bcmp("abc", "def", 0) == 0, 8); /* Zero count. */ in test_bcmp()
1325 check(strerror(EDOM) != 0, 1); in test_strerror()
1326 check(strerror(ERANGE) != 0, 2); in test_strerror()
1327 check(strerror(ENOENT) != 0, 3); in test_strerror()
1335 check(strcasecmp("a", "a") == 0, 1); in test_strcasecmp()
1336 check(strcasecmp("a", "A") == 0, 2); in test_strcasecmp()
1337 check(strcasecmp("A", "a") == 0, 3); in test_strcasecmp()
1338 check(strcasecmp("a", "b") < 0, 4); in test_strcasecmp()
1339 check(strcasecmp("c", "b") > 0, 5); in test_strcasecmp()
1340 check(strcasecmp("abc", "AbC") == 0, 6); in test_strcasecmp()
1341 check(strcasecmp("0123456789", "0123456789") == 0, 7); in test_strcasecmp()
1342 check(strcasecmp("", "0123456789") < 0, 8); in test_strcasecmp()
1343 check(strcasecmp("AbC", "") > 0, 9); in test_strcasecmp()
1344 check(strcasecmp("AbC", "A") > 0, 10); in test_strcasecmp()
1345 check(strcasecmp("AbC", "Ab") > 0, 11); in test_strcasecmp()
1346 check(strcasecmp("AbC", "ab") > 0, 12); in test_strcasecmp()
1354 check(strncasecmp("a", "a", 5) == 0, 1); in test_strncasecmp()
1355 check(strncasecmp("a", "A", 5) == 0, 2); in test_strncasecmp()
1356 check(strncasecmp("A", "a", 5) == 0, 3); in test_strncasecmp()
1357 check(strncasecmp("a", "b", 5) < 0, 4); in test_strncasecmp()
1358 check(strncasecmp("c", "b", 5) > 0, 5); in test_strncasecmp()
1359 check(strncasecmp("abc", "AbC", 5) == 0, 6); in test_strncasecmp()
1360 check(strncasecmp("0123456789", "0123456789", 10) == 0, 7); in test_strncasecmp()
1361 check(strncasecmp("", "0123456789", 10) < 0, 8); in test_strncasecmp()
1362 check(strncasecmp("AbC", "", 5) > 0, 9); in test_strncasecmp()
1363 check(strncasecmp("AbC", "A", 5) > 0, 10); in test_strncasecmp()
1364 check(strncasecmp("AbC", "Ab", 5) > 0, 11); in test_strncasecmp()
1365 check(strncasecmp("AbC", "ab", 5) > 0, 12); in test_strncasecmp()
1366 check(strncasecmp("0123456789", "AbC", 0) == 0, 13); in test_strncasecmp()
1367 check(strncasecmp("AbC", "abc", 1) == 0, 14); in test_strncasecmp()
1368 check(strncasecmp("AbC", "abc", 2) == 0, 15); in test_strncasecmp()
1369 check(strncasecmp("AbC", "abc", 3) == 0, 16); in test_strncasecmp()
1370 check(strncasecmp("AbC", "abcd", 3) == 0, 17); in test_strncasecmp()
1371 check(strncasecmp("AbC", "abcd", 4) < 0, 18); in test_strncasecmp()
1372 check(strncasecmp("ADC", "abcd", 1) == 0, 19); in test_strncasecmp()
1373 check(strncasecmp("ADC", "abcd", 2) > 0, 20); in test_strncasecmp()
1380 check(strcasestr("abCd", "z") == NULL, 1); /* Not found. */ in test_strcasestr()
1381 check(strcasestr("AbcD", "abX") == NULL, 2); /* Dead end. */ in test_strcasestr()
1383 check(strcasestr(one, "c") == one+2, 3); /* Basic test. */ in test_strcasestr()
1384 check(strcasestr(one, "Bc") == one+1, 4); /* Multichar. */ in test_strcasestr()
1385 check(strcasestr(one, "d") == one+3, 5); /* End of string. */ in test_strcasestr()
1386 check(strcasestr(one, "Cd") == one+2, 6); /* Tail of string. */ in test_strcasestr()
1387 check(strcasestr(one, "aBc") == one, 7); /* Beginning. */ in test_strcasestr()
1388 check(strcasestr(one, "aBcd") == one, 8); /* Exact match. */ in test_strcasestr()
1389 check(strcasestr(one, "AbcDe") == NULL, 9); /* Too long. */ in test_strcasestr()
1390 check(strcasestr(one, "dE") == NULL, 10); /* Past end. */ in test_strcasestr()
1391 check(strcasestr(one, "") == one, 11); /* Finding empty. */ in test_strcasestr()
1393 check(strcasestr(one, "Ba") == one+1, 12); /* Finding first. */ in test_strcasestr()
1395 check(strcasestr(one, "b") == NULL, 13); /* Empty string. */ in test_strcasestr()
1396 check(strcasestr(one, "") == one, 14); /* Empty in empty string. */ in test_strcasestr()
1398 check(strcasestr(one, "bCa") == one+2, 15); /* False start. */ in test_strcasestr()
1400 check(strcasestr(one, "bbCa") == one+1, 16); /* With overlap. */ in test_strcasestr()