1 new test case sdp_data_alloc function from lib/sdp.c code. --- unit/test-sdp.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/unit/test-sdp.c b/unit/test-sdp.c index c53ce21..8ce802d 100644 --- a/unit/test-sdp.c +++ b/unit/test-sdp.c @@ -276,6 +276,17 @@ START_TEST(tc_sdp_data_alloc_with_length_text_unspec) } END_TEST +/* sdp_data_alloc testcases */ +START_TEST(tc_sdp_data_alloc_null) +{ + sdp_data_t *ret; + + ret = sdp_data_alloc(SDP_TEXT_STR16, NULL); + + ck_assert(ret == NULL); +} +END_TEST + static void add_test(Suite *s, const char *name, TFun func) { TCase *t; @@ -326,6 +337,8 @@ int main(int argc, char *argv[]) tc_sdp_data_alloc_with_length_text_seq32); add_test(s, "sdp_data_alloc_with_length:indefined param", tc_sdp_data_alloc_with_length_text_unspec); + /* sdp_data_alloc testcases */ + add_test(s, "sdp_data_alloc:NULL param", tc_sdp_data_alloc_null); sr = srunner_create(s); -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html