From ac0559db82bfef3b7ca3d976b1d7700ed2c1c1fc Mon Sep 17 00:00:00 2001 From: Charles Date: Fri, 31 Jan 2020 10:44:30 +0100 Subject: hash table unit testing, norming --- test/src/runner/test_ft_strlen_runner.c | 6 ------ test/src/runner/test_runner_ht.c | 22 ++++++++++++++++++++++ test/src/runner/test_runner_str.c | 6 ++++++ 3 files changed, 28 insertions(+), 6 deletions(-) delete mode 100644 test/src/runner/test_ft_strlen_runner.c create mode 100644 test/src/runner/test_runner_ht.c create mode 100644 test/src/runner/test_runner_str.c (limited to 'test/src/runner') diff --git a/test/src/runner/test_ft_strlen_runner.c b/test/src/runner/test_ft_strlen_runner.c deleted file mode 100644 index 368c033..0000000 --- a/test/src/runner/test_ft_strlen_runner.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "libft_test.h" - -TEST_GROUP_RUNNER(ft_strlen) -{ - RUN_TEST_CASE(ft_strlen, yo); -} diff --git a/test/src/runner/test_runner_ht.c b/test/src/runner/test_runner_ht.c new file mode 100644 index 0000000..d8718af --- /dev/null +++ b/test/src/runner/test_runner_ht.c @@ -0,0 +1,22 @@ +#include "libft_test.h" + +TEST_GROUP_RUNNER(ft_htnew) +{ + RUN_TEST_CASE(ft_htnew, segfault); + RUN_TEST_CASE(ft_htnew, error_null); + RUN_TEST_CASE(ft_htnew, happy_path); +} + +TEST_GROUP_RUNNER(ft_htget) +{ + RUN_TEST_CASE(ft_htget, segfault); + RUN_TEST_CASE(ft_htget, error_null); +} + +TEST_GROUP_RUNNER(ft_htset) +{ + RUN_TEST_CASE(ft_htset, segfault); + RUN_TEST_CASE(ft_htset, error_null); + RUN_TEST_CASE(ft_htset, happy_path); + RUN_TEST_CASE(ft_htset, collision); +} diff --git a/test/src/runner/test_runner_str.c b/test/src/runner/test_runner_str.c new file mode 100644 index 0000000..368c033 --- /dev/null +++ b/test/src/runner/test_runner_str.c @@ -0,0 +1,6 @@ +#include "libft_test.h" + +TEST_GROUP_RUNNER(ft_strlen) +{ + RUN_TEST_CASE(ft_strlen, yo); +} -- cgit