aboutsummaryrefslogtreecommitdiff
path: root/test/src/ht/test_ft_htdestroy.c
blob: 4d212e1a4a5e25c5c72b6d57193439dcab197bbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   test_ft_htdestroy.c                                :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: cacharle <marvin@42.fr>                    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/02/19 02:45:27 by cacharle          #+#    #+#             */
/*   Updated: 2020/04/03 07:07:07 by charles          ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "libft_test.h"

TEST_GROUP(ft_htdestroy);

TEST_SETUP(ft_htdestroy)
{}

TEST_TEAR_DOWN(ft_htdestroy)
{}

TEST(ft_htdestroy, basic)
{
	t_ftht *ht = ft_htnew(2);

	ft_htset(ht, "a", strdup("1"), free);
	ft_htset(ht, "b", strdup("2"), free);
	ft_htset(ht, "c", "3", NULL);
	ft_htset(ht, "d", "4", NULL);
	ft_htdestroy(ht, NULL);
}