Lines Matching refs:equal
73 equal (const char *a, const char *b, int number) in equal() function
150 equal (one, "abcd", 2); /* Basic test. */ in test_strcpy()
153 equal (one, "x", 3); /* Writeover. */ in test_strcpy()
154 equal (one+2, "cd", 4); /* Wrote too much? */ in test_strcpy()
158 equal (one, "hi there", 5); /* Basic test encore. */ in test_strcpy()
159 equal (two, "hi there", 6); /* Stomped on source? */ in test_strcpy()
162 equal (one, "", 7); /* Boundary condition. */ in test_strcpy()
167 equal (one + i, "hi there", 8 + (i * 2)); in test_strcpy()
169 equal (two, "hi there", 9 + (i * 2)); in test_strcpy()
194 equal (dst, "frobozz", 2); in test_strcpy()
202 equal (one, "a", 2); in test_stpcpy()
205 equal (one, "ab", 4); in test_stpcpy()
208 equal (one, "abc", 6); in test_stpcpy()
211 equal (one, "abcd", 8); in test_stpcpy()
214 equal (one, "abcde", 10); in test_stpcpy()
217 equal (one, "abcdef", 12); in test_stpcpy()
220 equal (one, "abcdefg", 14); in test_stpcpy()
223 equal (one, "abcdefgh", 16); in test_stpcpy()
226 equal (one, "abcdefghi", 18); in test_stpcpy()
229 equal (one, "x", 20); /* Writeover. */ in test_stpcpy()
230 equal (one+2, "cdefghi", 21); /* Wrote too much? */ in test_stpcpy()
233 equal (one, "xx", 23); /* Writeover. */ in test_stpcpy()
234 equal (one+3, "defghi", 24); /* Wrote too much? */ in test_stpcpy()
237 equal (one, "xxx", 26); /* Writeover. */ in test_stpcpy()
238 equal (one+4, "efghi", 27); /* Wrote too much? */ in test_stpcpy()
241 equal (one, "xxxx", 29); /* Writeover. */ in test_stpcpy()
242 equal (one+5, "fghi", 30); /* Wrote too much? */ in test_stpcpy()
245 equal (one, "xxxxx", 32); /* Writeover. */ in test_stpcpy()
246 equal (one+6, "ghi", 33); /* Wrote too much? */ in test_stpcpy()
249 equal (one, "xxxxxx", 35); /* Writeover. */ in test_stpcpy()
250 equal (one+7, "hi", 36); /* Wrote too much? */ in test_stpcpy()
253 equal (one, "xxxxxxx", 38); /* Writeover. */ in test_stpcpy()
254 equal (one+8, "i", 39); /* Wrote too much? */ in test_stpcpy()
257 equal (one, "abc", 41); in test_stpcpy()
258 equal (one + 4, "xxx", 42); in test_stpcpy()
300 equal (one, "ijklmn", 2); /* Basic test. */ in test_strcat()
304 equal (one, "xyz", 3); /* Writeover. */ in test_strcat()
305 equal (one+4, "mn", 4); /* Wrote too much? */ in test_strcat()
310 equal (one, "ghef", 5); /* Basic test encore. */ in test_strcat()
311 equal (two, "ef", 6); /* Stomped on source? */ in test_strcat()
315 equal (one, "", 7); /* Boundary conditions. */ in test_strcat()
318 equal (one, "ab", 8); in test_strcat()
321 equal (one, "cd", 9); in test_strcat()
374 equal (one, "ijklmn", 2); /* Basic test. */ in test_strncat()
378 equal (one, "xyz", 3); /* Writeover. */ in test_strncat()
379 equal (one+4, "mn", 4); /* Wrote too much? */ in test_strncat()
384 equal (one, "ghef", 5); /* Basic test encore. */ in test_strncat()
385 equal (two, "ef", 6); /* Stomped on source? */ in test_strncat()
389 equal (one, "", 7); /* Boundary conditions. */ in test_strncat()
392 equal (one, "ab", 8); in test_strncat()
395 equal (one, "cd", 9); in test_strncat()
399 equal (one, "abcd", 10); /* Count-limited. */ in test_strncat()
402 equal (one, "abcd", 11); /* Zero count. */ in test_strncat()
405 equal (one, "abcdgh", 12); /* Count and length equal. */ in test_strncat()
408 equal (one, "abcdghij", 13); in test_strncat()
483 equal (one, "abc", 2); /* Did the copy go right? */ in test_strncpy()
487 equal (one, "xycdefgh", 3); /* Copy cut by count. */ in test_strncpy()
491 equal (one, "xyzdefgh", 4); in test_strncpy()
495 equal (one, "xyz", 5); in test_strncpy()
496 equal (one+4, "efgh", 6); /* Wrote too much? */ in test_strncpy()
500 equal (one, "xyz", 7); in test_strncpy()
501 equal (one+4, "", 8); in test_strncpy()
502 equal (one+5, "fgh", 9); in test_strncpy()
506 equal (one, "abc", 10); in test_strncpy()
509 equal (one, "", 11); in test_strncpy()
510 equal (one+1, "", 12); in test_strncpy()
511 equal (one+2, "c", 13); in test_strncpy()
515 equal (two, "hi there", 14); /* Just paranoia. */ in test_strncpy()
516 equal (one, "hi there", 15); /* Stomped on source? */ in test_strncpy()
846 equal(strtok(one, ", "), "first", 1); /* Basic test. */ in test_strtok()
847 equal(one, "first", 2); in test_strtok()
848 equal(strtok((char *)NULL, ", "), "second", 3); in test_strtok()
849 equal(strtok((char *)NULL, ", "), "third", 4); in test_strtok()
852 equal(strtok(one, ", "), "first", 6); /* Extra delims, 1 tok. */ in test_strtok()
855 equal(strtok(one, ", "), "1a", 8); /* Changing delim lists. */ in test_strtok()
856 equal(strtok((char *)NULL, "; "), "1b", 9); in test_strtok()
857 equal(strtok((char *)NULL, ", "), "2a", 10); in test_strtok()
859 equal(strtok(two, "-"), "x", 11); /* New string before done. */ in test_strtok()
860 equal(strtok((char *)NULL, "-"), "y", 12); in test_strtok()
863 equal(strtok(one, ", "), "a", 14); /* Different separators. */ in test_strtok()
864 equal(strtok((char *)NULL, ", "), "b", 15); in test_strtok()
865 equal(strtok((char *)NULL, " ,"), "c", 16); /* Permute list too. */ in test_strtok()
866 equal(strtok((char *)NULL, " ,"), "d", 17); in test_strtok()
874 equal(strtok(one, ", "), "abc", 22); /* No delimiters. */ in test_strtok()
877 equal(strtok(one, ""), "abc", 24); /* Empty delimiter list. */ in test_strtok()
881 equal(strtok(one, ","), "a", 26); /* Basics again... */ in test_strtok()
882 equal(strtok((char *)NULL, ","), "b", 27); in test_strtok()
883 equal(strtok((char *)NULL, ","), "c", 28); in test_strtok()
885 equal(one+6, "gh", 30); /* Stomped past end? */ in test_strtok()
886 equal(one, "a", 31); /* Stomped old tokens? */ in test_strtok()
887 equal(one+2, "b", 32); in test_strtok()
888 equal(one+4, "c", 33); in test_strtok()
897 equal(strtok_r(one, ", ", &cp), "first", 1); /* Basic test. */ in test_strtok_r()
898 equal(one, "first", 2); in test_strtok_r()
899 equal(strtok_r((char *)NULL, ", ", &cp), "second", 3); in test_strtok_r()
900 equal(strtok_r((char *)NULL, ", ", &cp), "third", 4); in test_strtok_r()
904 equal(strtok_r(one, ", ", &cp), "first", 6); /* Extra delims, 1 tok. */ in test_strtok_r()
908 equal(strtok_r(one, ", ", &cp), "1a", 8); /* Changing delim lists. */ in test_strtok_r()
909 equal(strtok_r((char *)NULL, "; ", &cp), "1b", 9); in test_strtok_r()
910 equal(strtok_r((char *)NULL, ", ", &cp), "2a", 10); in test_strtok_r()
913 equal(strtok_r(two, "-", &cp), "x", 11); /* New string before done. */ in test_strtok_r()
914 equal(strtok_r((char *)NULL, "-", &cp), "y", 12); in test_strtok_r()
918 equal(strtok_r(one, ", ", &cp), "a", 14); /* Different separators. */ in test_strtok_r()
919 equal(strtok_r((char *)NULL, ", ", &cp), "b", 15); in test_strtok_r()
920 equal(strtok_r((char *)NULL, " ,", &cp), "c", 16); /* Permute list too. */ in test_strtok_r()
921 equal(strtok_r((char *)NULL, " ,", &cp), "d", 17); in test_strtok_r()
933 equal(strtok_r(one, ", ", &cp), "abc", 23); /* No delimiters. */ in test_strtok_r()
937 equal(strtok_r(one, "", &cp), "abc", 25); /* Empty delimiter list. */ in test_strtok_r()
942 equal(strtok_r(one, ",", &cp), "a", 27); /* Basics again... */ in test_strtok_r()
943 equal(strtok_r((char *)NULL, ",", &cp), "b", 28); in test_strtok_r()
944 equal(strtok_r((char *)NULL, ",", &cp), "c", 29); in test_strtok_r()
946 equal(one+6, "gh", 31); /* Stomped past end? */ in test_strtok_r()
947 equal(one, "a", 32); /* Stomped old tokens? */ in test_strtok_r()
948 equal(one+2, "b", 33); in test_strtok_r()
949 equal(one+4, "c", 34); in test_strtok_r()
962 equal(strsep(&cp, ", "), "first", 1); /* Basic test. */ in test_strsep()
963 equal(one, "first", 2); in test_strsep()
964 equal(strsep(&cp, ", "), "", 3); in test_strsep()
965 equal(strsep(&cp, ", "), "second", 4); in test_strsep()
966 equal(strsep(&cp, ", "), "", 5); in test_strsep()
967 equal(strsep(&cp, ", "), "third", 6); in test_strsep()
970 equal(strsep(&cp, ", "), "", 8); in test_strsep()
971 equal(strsep(&cp, ", "), "", 9); in test_strsep()
972 equal(strsep(&cp, ", "), "first", 10); /* Extra delims, 1 tok. */ in test_strsep()
973 equal(strsep(&cp, ", "), "", 11); in test_strsep()
974 equal(strsep(&cp, ", "), "", 12); in test_strsep()
977 equal(strsep(&cp, ", "), "1a", 14); /* Changing delim lists. */ in test_strsep()
978 equal(strsep(&cp, ", "), "", 15); in test_strsep()
979 equal(strsep(&cp, "; "), "1b", 16); in test_strsep()
980 equal(strsep(&cp, ", "), "", 17); in test_strsep()
981 equal(strsep(&cp, ", "), "2a", 18); in test_strsep()
983 equal(strsep(&cp, "-"), "x", 19); /* New string before done. */ in test_strsep()
984 equal(strsep(&cp, "-"), "y", 20); in test_strsep()
987 equal(strsep(&cp, ", "), "a", 22); /* Different separators. */ in test_strsep()
988 equal(strsep(&cp, ", "), "b", 23); in test_strsep()
989 equal(strsep(&cp, " ,"), "", 24); in test_strsep()
990 equal(strsep(&cp, " ,"), "c", 25); /* Permute list too. */ in test_strsep()
991 equal(strsep(&cp, " ,"), "", 26); in test_strsep()
992 equal(strsep(&cp, " ,"), "", 27); in test_strsep()
993 equal(strsep(&cp, " ,"), "", 28); in test_strsep()
994 equal(strsep(&cp, " ,"), "d", 29); in test_strsep()
995 equal(strsep(&cp, " ,"), "", 30); in test_strsep()
999 equal(strsep(&cp, ", "), "", 33); in test_strsep()
1000 equal(strsep(&cp, ", "), "", 34); in test_strsep()
1001 equal(strsep(&cp, ", "), "", 35); in test_strsep()
1004 equal(strsep(&cp, ", "), "", 37); in test_strsep()
1007 equal(strsep(&cp, ", "), "abc", 39); /* No delimiters. */ in test_strsep()
1010 equal(strsep(&cp, ""), "abc", 41); /* Empty delimiter list. */ in test_strsep()
1014 equal(strsep(&cp, ","), "a", 43); /* Basics again... */ in test_strsep()
1015 equal(strsep(&cp, ","), "b", 44); in test_strsep()
1016 equal(strsep(&cp, ","), "c", 45); in test_strsep()
1018 equal(one+6, "gh", 47); /* Stomped past end? */ in test_strsep()
1019 equal(one, "a", 48); /* Stomped old tokens? */ in test_strsep()
1020 equal(one+2, "b", 49); in test_strsep()
1021 equal(one+4, "c", 50); in test_strsep()
1026 equal (strsep (&list, ","), "This", 51); in test_strsep()
1027 equal (strsep (&list, ","), "is", 52); in test_strsep()
1028 equal (strsep (&list, ","), "a", 53); in test_strsep()
1029 equal (strsep (&list, ","), "test", 54); in test_strsep()
1034 equal(strsep(&cp, ","), "a", 56); /* Different separators. */ in test_strsep()
1035 equal(strsep(&cp, ","), "b", 57); in test_strsep()
1036 equal(strsep(&cp, ","), " c", 58); /* Permute list too. */ in test_strsep()
1037 equal(strsep(&cp, ","), "", 59); in test_strsep()
1038 equal(strsep(&cp, ","), " ", 60); in test_strsep()
1039 equal(strsep(&cp, ","), "d", 61); in test_strsep()
1040 equal(strsep(&cp, ","), "", 62); in test_strsep()
1045 equal(strsep(&cp, "xy,"), "a", 65); /* Different separators. */ in test_strsep()
1046 equal(strsep(&cp, "x,y"), "b", 66); in test_strsep()
1047 equal(strsep(&cp, ",xy"), " c", 67); /* Permute list too. */ in test_strsep()
1048 equal(strsep(&cp, "xy,"), "", 68); in test_strsep()
1049 equal(strsep(&cp, "x,y"), " ", 69); in test_strsep()
1050 equal(strsep(&cp, ",xy"), "d", 70); in test_strsep()
1051 equal(strsep(&cp, "xy,"), "", 71); in test_strsep()
1057 equal(strsep(&cp, "C"), "AB", 74); /* Access beyond NUL. */ in test_strsep()
1059 equal(ptr, "", 75); in test_strsep()
1065 equal(strsep(&cp, "CD"), "AB", 78); /* Access beyond NUL. */ in test_strsep()
1067 equal(ptr, "", 79); in test_strsep()
1071 equal(strsep(&cp, ","), "ABC", 81); in test_strsep()
1077 equal(ptr, "", 83); in test_strsep()
1084 equal(ptr, "", 86); in test_strsep()
1170 equal(one, "abc", 2); /* Did the copy go right? */ in test_memcpy()
1174 equal(one, "axydefgh", 3); /* Basic test. */ in test_memcpy()
1178 equal(one, "abc", 4); /* Zero-length copy. */ in test_memcpy()
1183 equal(two, "hi there", 5); /* Just paranoia. */ in test_memcpy()
1184 equal(one, "hi there", 6); /* Stomped on source? */ in test_memcpy()
1193 equal (one + i, "hi there", 9 + (i * 6)); in test_memcpy()
1197 equal (two, "hi there", 12 + (i * 6)); in test_memcpy()
1207 equal(one, "abc", 2); /* Did the copy go right? */ in test_mempcpy()
1211 equal(one, "axydefgh", 3); /* Basic test. */ in test_mempcpy()
1215 equal(one, "abc", 4); /* Zero-length copy. */ in test_mempcpy()
1220 equal(two, "hi there", 5); /* Just paranoia. */ in test_mempcpy()
1221 equal(one, "hi there", 6); /* Stomped on source? */ in test_mempcpy()
1230 equal (one + i, "hi there", 9 + (i * 6)); in test_mempcpy()
1234 equal (two, "hi there", 12 + (i * 6)); in test_mempcpy()
1243 equal(one, "abc", 2); /* Did the copy go right? */ in test_memmove()
1247 equal(one, "axydefgh", 3); /* Basic test. */ in test_memmove()
1251 equal(one, "abc", 4); /* Zero-length copy. */ in test_memmove()
1256 equal(two, "hi there", 5); /* Just paranoia. */ in test_memmove()
1257 equal(one, "hi there", 6); /* Stomped on source? */ in test_memmove()
1261 equal(one, "aabcdefgh", 7); /* Overlap, right-to-left. */ in test_memmove()
1265 equal(one, "acdefgh", 8); /* Overlap, left-to-right. */ in test_memmove()
1269 equal(one, "abcdefgh", 9); /* 100% overlap. */ in test_memmove()
1281 equal(one, "abc", 2); /* Did the copy go right? */ in test_memccpy()
1285 equal(one, "axydefgh", 3); /* Basic test. */ in test_memccpy()
1289 equal(one, "abc", 4); /* Zero-length copy. */ in test_memccpy()
1294 equal(two, "hi there", 5); /* Just paranoia. */ in test_memccpy()
1295 equal(one, "hi there", 6); /* Stomped on source? */ in test_memccpy()
1300 equal(one, "abcdefgh", 8); /* Source intact? */ in test_memccpy()
1301 equal(two, "abcdefeathers", 9); /* Copy correct? */ in test_memccpy()
1306 equal(two, "aumblebee", 11); in test_memccpy()
1308 equal(two, "abcdlebee", 13); in test_memccpy()
1311 equal(two, "xbcdlebee", 15); in test_memccpy()
1322 equal(one, "axxxefgh", 2); /* Basic test. */ in test_memset()
1325 equal(one, "axxxefgh", 3); /* Zero-length set. */ in test_memset()
1328 equal(one, "axxxe", 4); /* Zero fill. */ in test_memset()
1329 equal(one+6, "gh", 5); /* And the leftover. */ in test_memset()
1332 equal(one, "ax\045xe", 6); /* Unsigned char convert. */ in test_memset()
1383 equal(one, "abc", 1); /* Simple copy. */ in test_bcopy()
1387 equal(one, "axydefgh", 2); /* Basic test. */ in test_bcopy()
1391 equal(one, "abc", 3); /* Zero-length copy. */ in test_bcopy()
1396 equal(two, "hi there", 4); /* Just paranoia. */ in test_bcopy()
1397 equal(one, "hi there", 5); /* Stomped on source? */ in test_bcopy()
1406 equal(one, "ab", 1); /* Basic test. */ in test_bzero()
1407 equal(one+3, "", 2); in test_bzero()
1408 equal(one+4, "ef", 3); in test_bzero()
1412 equal(one, "abcdef", 4); /* Zero-length copy. */ in test_bzero()
1424 equal(p, "abcdef", 2); in test_strndup()
1428 equal(q, "bc", 4); in test_strndup()
1435 equal(p, "abc", 6); in test_strndup()