aboutsummaryrefslogtreecommitdiff
path: root/test/src/ht/test_ft_htnew.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-02-17 05:03:15 +0100
committerCharles <sircharlesaze@gmail.com>2020-02-17 05:03:15 +0100
commit0362f55a094b5ec813d940b66f397abfa13fbe49 (patch)
tree98283bdff3d1a0bb876fc55fa535d60d4aa2a6a9 /test/src/ht/test_ft_htnew.c
parenteb0678367c5cb09b43423f77d6f1c3063fae9a91 (diff)
downloadlibft-0362f55a094b5ec813d940b66f397abfa13fbe49.tar.gz
libft-0362f55a094b5ec813d940b66f397abfa13fbe49.tar.bz2
libft-0362f55a094b5ec813d940b66f397abfa13fbe49.zip
amend me
Diffstat (limited to 'test/src/ht/test_ft_htnew.c')
-rw-r--r--test/src/ht/test_ft_htnew.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/test/src/ht/test_ft_htnew.c b/test/src/ht/test_ft_htnew.c
index b8729bd..6b90f03 100644
--- a/test/src/ht/test_ft_htnew.c
+++ b/test/src/ht/test_ft_htnew.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/12 22:30:06 by cacharle #+# #+# */
-/* Updated: 2020/02/12 22:30:09 by cacharle ### ########.fr */
+/* Updated: 2020/02/17 04:18:20 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -24,7 +24,6 @@ int helper_segfault_pid;
TEST(ft_htnew, segfault)
{
- TEST_IGNORE();
TEST_ASSERT_SEGFAULT(ft_htnew(10));
TEST_ASSERT_SEGFAULT(ft_htnew(0));
TEST_ASSERT_SEGFAULT(ft_htnew((1 << 14) + 1));
@@ -32,20 +31,17 @@ TEST(ft_htnew, segfault)
TEST(ft_htnew, error_null)
{
- TEST_IGNORE();
- TEST_ASSERT_NOT_NULL(ft_htnew(10)); // leak
+ TEST_ASSERT_NOT_NULL(ft_htnew(10));
TEST_ASSERT_NULL(ft_htnew(0));
- TEST_ASSERT_NULL(ft_htnew((1 << 14) + 1));
}
TEST(ft_htnew, happy_path)
{
- TEST_IGNORE();
t_ftht *ht;
ht = ft_htnew(10);
TEST_ASSERT_NOT_NULL(ht);
- TEST_ASSERT_EQUAL(ht->size, 10);
+ TEST_ASSERT_EQUAL(10, ht->size);
TEST_ASSERT_NOT_NULL(ht->entries);
for (t_ftsize i = 0; i < ht->size; i++)
TEST_ASSERT_NULL(ht->entries[i]);