Skip to content

Commit d98abed

Browse files
committed
cleanup(tests): dropped test_mod_register_NULL_hook because NULL hook is not an error condition anymore.
Signed-off-by: Federico Di Pierro <[email protected]>
1 parent ae41e8d commit d98abed

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

tests/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ int main(void) {
1414
const struct CMUnitTest tests[] = {
1515
/* Test module_register failures */
1616
cmocka_unit_test(test_mod_register_NULL_name),
17-
cmocka_unit_test(test_mod_register_NULL_hook),
18-
17+
1918
/* Test ctx register */
2019
cmocka_unit_test(test_ctx_register_NULL_name),
2120
cmocka_unit_test(test_ctx_register),

tests/test_mod.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ void test_mod_register_NULL_name(void **state) {
2727
assert_null(test_mod);
2828
}
2929

30-
void test_mod_register_NULL_hook(void **state) {
31-
(void) state; /* unused */
32-
33-
int ret = m_mod_register("testName", &test_mod, NULL, 0, NULL);
34-
assert_false(ret == 0);
35-
assert_null(test_mod);
36-
}
37-
3830
void test_mod_register(void **state) {
3931
(void) state; /* unused */
4032

tests/test_mod.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "test_commons.h"
22

33
void test_mod_register_NULL_name(void **state);
4-
void test_mod_register_NULL_hook(void **state);
54
void test_mod_register(void **state);
65
void test_mod_register_already_registered(void **state);
76
void test_mod_register_same_name(void **state);

0 commit comments

Comments
 (0)