From dd5d60dc4cf8052feb00847f9b2276cf105b0551 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 30 Mar 2020 22:43:25 +0200 Subject: Renaming test according to src --- test/src/lst/test_ft_lstmap.c | 58 +++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'test/src/lst/test_ft_lstmap.c') diff --git a/test/src/lst/test_ft_lstmap.c b/test/src/lst/test_ft_lstmap.c index 4abdddc..53c2f7a 100644 --- a/test/src/lst/test_ft_lstmap.c +++ b/test/src/lst/test_ft_lstmap.c @@ -29,54 +29,54 @@ TEST(ft_lstmap, basic) mapped = ft_lstmap(lst, f_square, free); TEST_ASSERT_NULL(mapped); - ft_lstadd_front(&lst, ft_lstnew(&a)); + ft_lstpush_front(&lst, ft_lstnew(&a)); mapped = ft_lstmap(lst, f_square, free); TEST_ASSERT_NOT_NULL(mapped); - TEST_ASSERT_NOT_NULL(mapped->content); - TEST_ASSERT_EQUAL(4, *(int*)mapped->content); + TEST_ASSERT_NOT_NULL(mapped->data); + TEST_ASSERT_EQUAL(4, *(int*)mapped->data); TEST_ASSERT_NULL(mapped->next); - ft_lstclear(&mapped, free); + ft_lstdestroy(&mapped, free); - ft_lstadd_front(&lst, ft_lstnew(&b)); + ft_lstpush_front(&lst, ft_lstnew(&b)); mapped = ft_lstmap(lst, f_square, free); TEST_ASSERT_NOT_NULL(mapped); - TEST_ASSERT_NOT_NULL(mapped->content); - TEST_ASSERT_EQUAL(9, *(int*)mapped->content); + TEST_ASSERT_NOT_NULL(mapped->data); + TEST_ASSERT_EQUAL(9, *(int*)mapped->data); TEST_ASSERT_NOT_NULL(mapped->next); - TEST_ASSERT_NOT_NULL(mapped->next->content); - TEST_ASSERT_EQUAL(4, *(int*)mapped->next->content); + TEST_ASSERT_NOT_NULL(mapped->next->data); + TEST_ASSERT_EQUAL(4, *(int*)mapped->next->data); TEST_ASSERT_NULL(mapped->next->next); - ft_lstclear(&mapped, free); + ft_lstdestroy(&mapped, free); - ft_lstadd_front(&lst, ft_lstnew(&c)); + ft_lstpush_front(&lst, ft_lstnew(&c)); mapped = ft_lstmap(lst, f_square, free); TEST_ASSERT_NOT_NULL(mapped); - TEST_ASSERT_NOT_NULL(mapped->content); - TEST_ASSERT_EQUAL(16, *(int*)mapped->content); + TEST_ASSERT_NOT_NULL(mapped->data); + TEST_ASSERT_EQUAL(16, *(int*)mapped->data); TEST_ASSERT_NOT_NULL(mapped->next); - TEST_ASSERT_NOT_NULL(mapped->next->content); - TEST_ASSERT_EQUAL(9, *(int*)mapped->next->content); + TEST_ASSERT_NOT_NULL(mapped->next->data); + TEST_ASSERT_EQUAL(9, *(int*)mapped->next->data); TEST_ASSERT_NOT_NULL(mapped->next->next); - TEST_ASSERT_NOT_NULL(mapped->next->next->content); - TEST_ASSERT_EQUAL(4, *(int*)mapped->next->next->content); + TEST_ASSERT_NOT_NULL(mapped->next->next->data); + TEST_ASSERT_EQUAL(4, *(int*)mapped->next->next->data); TEST_ASSERT_NULL(mapped->next->next->next); - ft_lstclear(&mapped, free); + ft_lstdestroy(&mapped, free); - ft_lstadd_front(&lst, ft_lstnew(&d)); + ft_lstpush_front(&lst, ft_lstnew(&d)); mapped = ft_lstmap(lst, f_square, free); TEST_ASSERT_NOT_NULL(mapped); - TEST_ASSERT_NOT_NULL(mapped->content); - TEST_ASSERT_EQUAL(25, *(int*)mapped->content); + TEST_ASSERT_NOT_NULL(mapped->data); + TEST_ASSERT_EQUAL(25, *(int*)mapped->data); TEST_ASSERT_NOT_NULL(mapped->next); - TEST_ASSERT_NOT_NULL(mapped->next->content); - TEST_ASSERT_EQUAL(16, *(int*)mapped->next->content); + TEST_ASSERT_NOT_NULL(mapped->next->data); + TEST_ASSERT_EQUAL(16, *(int*)mapped->next->data); TEST_ASSERT_NOT_NULL(mapped->next->next); - TEST_ASSERT_NOT_NULL(mapped->next->next->content); - TEST_ASSERT_EQUAL(9, *(int*)mapped->next->next->content); + TEST_ASSERT_NOT_NULL(mapped->next->next->data); + TEST_ASSERT_EQUAL(9, *(int*)mapped->next->next->data); TEST_ASSERT_NOT_NULL(mapped->next->next->next); - TEST_ASSERT_NOT_NULL(mapped->next->next->next->content); - TEST_ASSERT_EQUAL(4, *(int*)mapped->next->next->next->content); - ft_lstclear(&mapped, free); + TEST_ASSERT_NOT_NULL(mapped->next->next->next->data); + TEST_ASSERT_EQUAL(4, *(int*)mapped->next->next->next->data); + ft_lstdestroy(&mapped, free); - ft_lstclear(&lst, NULL); + ft_lstdestroy(&lst, NULL); } -- cgit