Compare commits
No commits in common. "723a2e901b70ece23be6338faca87a200f81bcc3" and "1c7245213e8f618444d8b92226a10a38fcfcc60f" have entirely different histories.
723a2e901b
...
1c7245213e
@ -1,4 +1,3 @@
|
|||||||
section .note.GNU-stack noalloc noexec nowrite progbits
|
|
||||||
section .text
|
section .text
|
||||||
global ft_strcpy
|
global ft_strcpy
|
||||||
|
|
||||||
|
@ -46,14 +46,14 @@ void multiple_test_int_2(int (*normal_func)(const char *, const char *), int (*o
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void multiple_test_strcpy(char *(*own_func)(char *, const char *), const char * const *values)
|
void multiple_test_strcpy(int (*own_func)(char *, const char *), const char * const *values)
|
||||||
{
|
{
|
||||||
char tmp[4096];
|
char tmp[4096];
|
||||||
|
|
||||||
for (size_t i = 0; values[i] != NULL; i++)
|
for (size_t i = 0; values[i] != NULL; i++)
|
||||||
{
|
{
|
||||||
printf("test: %s", values[i]);
|
printf("test: %s", values[i]);
|
||||||
test_size_t((size_t) strcpy(tmp, values[i]), (size_t) own_func(tmp, values[i]));
|
test_int(strcpy(tmp, values[i]), own_func(tmp, values[i]));
|
||||||
test_str(values[i], tmp);
|
test_str(values[i], tmp);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
@ -72,6 +72,7 @@ int main()
|
|||||||
multiple_test_int_2(strcmp, ft_strcmp, strcmp_tests);
|
multiple_test_int_2(strcmp, ft_strcmp, strcmp_tests);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
|
|
||||||
printf("STRCPY\n");
|
printf("STRCPY\n");
|
||||||
const char *strcpy_tests[] = {"yo", "", "bonjour", "co\0fgf", NULL};
|
const char *strcpy_tests[] = {"yo", "", "bonjour", "co\0fgf", NULL};
|
||||||
multiple_test_strcpy(ft_strcpy, strcpy_tests);
|
multiple_test_strcpy(ft_strcpy, strcpy_tests);
|
||||||
|
Loading…
Reference in New Issue
Block a user