From 19b839f69f8b17e8501a61052b469d404a2edcea Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 21 Dec 2018 15:28:11 +0100 Subject: [PATCH] [tests] test del_aubio_source on null --- tests/src/io/base-source_custom.h | 3 +++ tests/src/io/test-source.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/src/io/base-source_custom.h b/tests/src/io/base-source_custom.h index 6f5b941c..f530026c 100644 --- a/tests/src/io/base-source_custom.h +++ b/tests/src/io/base-source_custom.h @@ -145,6 +145,9 @@ int test_wrong_params(void) del_fmat(mat); del_fvec(vec); + // shouldn't crash on null (bypassed, only check del_aubio_source) + // del_aubio_source_custom(NULL); + return run_on_default_source(base_main); } diff --git a/tests/src/io/test-source.c b/tests/src/io/test-source.c index a3cad3ec..8b69f685 100644 --- a/tests/src/io/test-source.c +++ b/tests/src/io/test-source.c @@ -141,5 +141,8 @@ int test_wrong_params(void) del_fmat(mat); del_fvec(vec); + // shouldn't crash on null + del_aubio_source(NULL); + return run_on_default_source(main); } -- 2.11.0