token_type: add field with no logic for populating it

This commit is contained in:
Khaïs COLIN 2025-04-08 16:36:11 +02:00
parent 5716c4b3dc
commit 18014cda98
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
9 changed files with 39 additions and 32 deletions

View file

@ -6,7 +6,7 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/10 14:59:19 by khais #+# #+# */
/* Updated: 2025/03/10 16:02:01 by khais ### ########.fr */
/* Updated: 2025/04/08 16:35:12 by khais ### ########.fr */
/* */
/* ************************************************************************** */
@ -32,7 +32,7 @@ static void test_wordlist_idx_pop_single_elem(void)
t_worddesc *got;
ft_dprintf(STDERR_FILENO, "==> %s <==\n", __FUNCTION__);
list = wordlist_create(worddesc_create(ft_strdup("hello"), 0, ft_strdup("")));
list = wordlist_create(worddesc_create(ft_strdup("hello"), 0, ft_strdup(""), WORD_TOKEN));
assert(NULL == wordlist_pop_idx(&list, 1));
got = wordlist_pop_idx(&list, 0);
assert(NULL != got);
@ -48,8 +48,8 @@ static void test_wordlist_idx_pop_second_then_first(void)
t_worddesc *got;
ft_dprintf(STDERR_FILENO, "==> %s <==\n", __FUNCTION__);
list = wordlist_create(worddesc_create(ft_strdup("hello"), 0, NULL));
list = wordlist_push(list, worddesc_create(ft_strdup("world"), 0, NULL));
list = wordlist_create(worddesc_create(ft_strdup("hello"), 0, NULL, WORD_TOKEN));
list = wordlist_push(list, worddesc_create(ft_strdup("world"), 0, NULL, WORD_TOKEN));
wordlist_debug(list);
got = wordlist_pop_idx(&list, 1);
assert(NULL != got);