-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
37 lines (34 loc) · 2.01 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: daelee <daelee@student.42seoul.kr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/12/10 12:44:56 by daelee #+# #+# */
/* Updated: 2020/12/10 12:48:57 by daelee ### ########.fr */
/* */
/* ************************************************************************** */
#include "libasm.h"
int main(void)
{
char s[50];
printf(BLUE"______TESTING <ft_strlen>______\n"RESET);
printf(CYAN"[case 1] "RESET"ft_strlen = %zu\n", ft_strlen(""));
printf(CYAN"[case 2] "RESET"ft_strlen = %zu\n", ft_strlen("daelee!"));
printf(BLUE"______TESTING <ft_strcmp>______\n"RESET);
printf(CYAN"[case 1] "RESET"ft_strcpy = %s\n", ft_strcpy(s, ""));
printf(CYAN"[case 2] "RESET"ft_strcpy = %s\n", ft_strcpy(s, "daelee!"));
printf(BLUE"______TESTING <ft_strcmp>______\n"RESET);
printf(CYAN"[case 1] "RESET"ft_strcmp = %d\n", ft_strcmp("a", "a"));
printf(CYAN"[case 2] "RESET"ft_strcmp = %d\n", ft_strcmp("a", "b"));
printf(BLUE"______TESTING <ft_wrtie>______\n"RESET);
printf(CYAN"[case 1] "RESET"ft_write = %zd\n", ft_write(1, "daelee!", 10));
printf(CYAN"[case 2] "RESET"ft_write = %zd\n", ft_write(1, "daelee!", 3));
printf(BLUE"______TESTING <ft_read>______\n"RESET);
printf(CYAN"[case 1] "RESET"ft_read = %zd\n", ft_read(0, s, 20));
printf(BLUE"______TESTING <ft_strdup>______\n"RESET);
printf(CYAN"[case 1] "RESET"ft_strdup = %s\n", ft_strdup(""));
printf(CYAN"[case 2] "RESET"ft_strdup = %s\n", ft_strdup("daelee!"));
return (1);
}