summaryrefslogtreecommitdiff
path: root/funcs
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2016-07-18 19:40:22 -0400
committerCorey Farrell <git@cfware.com>2016-07-18 19:40:22 -0400
commitcf1188a1be7c81892f480474eedf1a5639a1c1eb (patch)
tree7f291400a68fdf34d33987f2e56b0addcfaa6efc /funcs
parent943bb48b59435e00131cbd56b075f73f57d10e87 (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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/funcs/func_curl.c b/funcs/func_curl.c
index 6a8c36767..8ec1032a7 100644
--- a/funcs/func_curl.c
+++ b/funcs/func_curl.c
@@ -856,6 +856,7 @@ static struct ast_custom_function acf_curlopt = {
.write = acf_curlopt_write,
};
+#ifdef TEST_FRAMEWORK
AST_TEST_DEFINE(vulnerable_url)
{
const char *bad_urls [] = {
@@ -903,6 +904,7 @@ AST_TEST_DEFINE(vulnerable_url)
return res;
}
+#endif
static int unload_module(void)
{