refactor cmdlist.num_cmds -> cmdlist.num_cmd to be more consistent

This commit is contained in:
Khaïs COLIN 2025-03-19 16:26:45 +01:00
parent 448458b37f
commit 88ed66e138
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
7 changed files with 27 additions and 27 deletions

View file

@ -6,7 +6,7 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/13 15:21:09 by khais #+# #+# */
/* Updated: 2025/03/18 15:05:45 by khais ### ########.fr */
/* Updated: 2025/03/20 11:57:29 by khais ### ########.fr */
/* */
/* ************************************************************************** */
@ -84,8 +84,8 @@ void assert_pipelineequal_raw(t_pipeline *expected, t_pipeline *got)
void assert_pipelineequal(char *expected, t_cmdlist *cmd, int idx)
{
ft_printf("Expected command list %p to have at least %d pipelines, and got %d\n", cmd, idx + 1, cmd->num_cmds);
assert(cmd->num_cmds >= idx + 1);
ft_printf("Expected command list %p to have at least %d pipelines, and got %d\n", cmd, idx + 1, cmd->num_cmd);
assert(cmd->num_cmd >= idx + 1);
t_pipeline *got = cmd->cmds[idx]->inner.pipeline;
ft_dprintf(STDERR_FILENO, "Expected pipeline %p to equal [%s]\n", got, expected);
t_pipeline *expected_pipeline = parse_pipeline(expected);
@ -136,7 +136,7 @@ void assert_cmdgroup_itemlistequal(char *expected_str, t_cmdgroup *got_cmd, int
}
ft_dprintf(STDERR_FILENO, "checking if the list matches...\n");
int i = 0;
while (i < expected->num_cmds)
while (i < expected->num_cmd)
{
i++;
}