diff options
author | Corey Farrell <git@cfware.com> | 2016-07-18 19:39:39 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2016-07-18 19:39:39 -0400 |
commit | c8e41d14a1478b46a6c986a4c30ba2c8bdf86cd5 (patch) | |
tree | 1a40f381d57d0155665fc63aad6855507337836c /funcs | |
parent | 962c7ef5d91c546794313e01b4c264efdf3d1ead (diff) |
Unit tests: Use AST_TEST_DEFINE in conditional code only.
If AST_TEST_DEFINE is not conditional to TEST_FRAMEWORK it produces dead
code. This places all existing unit tests into a conditional block if
they weren't already.
ASTERISK-26211 #close
Change-Id: I8ef83ee11cbc991b07b7a37ecb41433e8c734686
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_curl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/funcs/func_curl.c b/funcs/func_curl.c index 61b05900b..c7a1c6e42 100644 --- a/funcs/func_curl.c +++ b/funcs/func_curl.c @@ -794,6 +794,7 @@ static struct ast_custom_function acf_curlopt = { .write = acf_curlopt_write, }; +#ifdef TEST_FRAMEWORK AST_TEST_DEFINE(vulnerable_url) { const char *bad_urls [] = { @@ -841,6 +842,7 @@ AST_TEST_DEFINE(vulnerable_url) return res; } +#endif static int unload_module(void) { |