From 37c7e61a5ed40454aabbbcb04c4a334caad04823 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 21 Dec 2018 15:30:14 +0100 Subject: [PATCH] [tests] test del_aubio_sink on null --- tests/src/io/base-sink_custom.h | 3 +++ tests/src/io/test-sink.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/src/io/base-sink_custom.h b/tests/src/io/base-sink_custom.h index e8c8886f..31043664 100644 --- a/tests/src/io/base-sink_custom.h +++ b/tests/src/io/base-sink_custom.h @@ -151,6 +151,9 @@ int test_wrong_params(void) // delete temp file close_temp_sink(sink_path, fd); + // shouldn't crash on null (bypassed, only check del_aubio_sink) + // del_aubio_sink_custom(NULL); + return run_on_default_source_and_sink(base_main); } diff --git a/tests/src/io/test-sink.c b/tests/src/io/test-sink.c index e004268f..35a20606 100644 --- a/tests/src/io/test-sink.c +++ b/tests/src/io/test-sink.c @@ -147,5 +147,8 @@ int test_wrong_params(void) // delete temp file close_temp_sink(sink_path, fd); + // shouldn't crash on null + del_aubio_sink(NULL); + return run_on_default_source_and_sink(main); } -- 2.11.0