Ejemplo n.º 1
0
int	ft_test_strchr(void)
{
	int		res;
	char	*str = "Hello world !";

	res = 0;
	ft_print_begin("ft_strchr");
	res += ft_test_strchr2(str, '!');
	res += ft_test_strchr2(str, 0);
	res += ft_test_strchr2(str, 'H');
	res += ft_test_strchr2(str, 'z');
	return (ft_print_end(res));
}
int	ft_test_strchr(void)
{
	int			res;
	const char		str[] = "Hello world !";
	char		c;

	res = 0;
	ft_print_begin("ft_strchr");
	c = 'a';
	res += ft_test_strchr2(str, 'H');
	while (c <= 'z')
		res += ft_test_strchr2(str, c++);
	res += ft_test_strchr2(str, '!');
	res += ft_test_strchr2(str, 0);
	return (ft_print_end(res));
}