ssl_des/inc/tests_macros.h

35 lines
1.5 KiB
C
Raw Normal View History

2018-10-23 20:41:44 +03:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* tests_macros.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/10/23 19:46:23 by gtertysh #+# #+# */
/* Updated: 2018/10/23 19:46:33 by gtertysh ### ########.fr */
/* */
/* ************************************************************************** */
2018-10-09 11:42:59 +03:00
2018-10-23 20:41:44 +03:00
#ifndef TESTS_MACROS_H
# define TESTS_MACROS_H
2018-10-09 11:42:59 +03:00
2018-10-23 20:41:44 +03:00
# include "munit.h"
2018-10-09 11:42:59 +03:00
2018-10-23 20:41:44 +03:00
# define UNUSED(x) (void)(x)
2018-10-09 11:42:59 +03:00
2018-10-23 20:41:44 +03:00
# define TEST_RESULT MunitResult
# define TEST_PARAMS const MunitParameter test_params[]
# define TEST_DATA void *test_data
# define CASE(f) TEST_RESULT f(TEST_PARAMS, TEST_DATA)
2018-10-09 11:42:59 +03:00
2018-10-23 20:41:44 +03:00
# define N(name) (char *)name
# define T(test_function) test_function
# define S(setup_function) setup_function
# define TD(tear_down_function) tear_down_function
# define O(options) options
# define P(paramenters) paramenters
# define IT(n, t, s, td, o, p) { N(n), T(t), S(s), TD(td), O(o), P(p) }
# define END_IT IT(NULL, NULL, NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL)
#endif