17 char *
string =
" Is th|is a| real ...| nah";
18 char **expected = ((
char*[5]){
" Is th",
"is a",
" real ...",
" nah", NULL});
19 char **actual =
ft_split(
string,
'|');
21 for (
int i = 0; i < 5; i++)
int ft_isdigit(int c)
Check if char is digit.
char ** ft_split(char const *s, char c)
Splits string to substrings.
int ft_atoi(const char *str)
ASCII to integer.
void test_ft_isdigit_should_be_false(void)
void test_ft_isdigit_should_be_true(void)
void test_ft_atoi_should_be_equal_int(void)
void test_tf_split_should_be_equal(void)
#define TEST_ASSERT_TRUE(condition)
#define TEST_ASSERT_FALSE(condition)
#define TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements)
#define TEST_ASSERT_EQUAL_INT(expected, actual)