diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-03-30 22:43:25 +0200 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-03-30 22:43:25 +0200 |
| commit | dd5d60dc4cf8052feb00847f9b2276cf105b0551 (patch) | |
| tree | 2c71a2799dd4314b6ca22f3847b30d7553845dce /test/src/lst/test_ft_lstmap.c | |
| parent | 901402c99018422c994bdb297e3ba404969c88ea (diff) | |
| download | libft-dd5d60dc4cf8052feb00847f9b2276cf105b0551.tar.gz libft-dd5d60dc4cf8052feb00847f9b2276cf105b0551.tar.bz2 libft-dd5d60dc4cf8052feb00847f9b2276cf105b0551.zip | |
Renaming test according to src
Diffstat (limited to 'test/src/lst/test_ft_lstmap.c')
| -rw-r--r-- | test/src/lst/test_ft_lstmap.c | 58 |
1 files changed, 29 insertions, 29 deletions
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); } |
