summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/apis/check_xxx/config.h.in2
-rw-r--r--tests/apis/check_xxx/main.c1
-rw-r--r--tests/apis/check_xxx/xmake.lua3
3 files changed, 6 insertions, 0 deletions
diff --git a/tests/apis/check_xxx/config.h.in b/tests/apis/check_xxx/config.h.in
index 617ecf864..a8baad68d 100644
--- a/tests/apis/check_xxx/config.h.in
+++ b/tests/apis/check_xxx/config.h.in
@@ -9,4 +9,6 @@ ${define HAS_CONSEXPR_AND_STATIC_ASSERT}
${define HAS_SSE2}
${define HAS_LONG_8}
${define PTR_SIZE}
+${define HAVE_VISIBILITY}
+${define CUSTOM_ASSERT}
#define HAS_WCHAR ${default HAS_WCHAR 0}
diff --git a/tests/apis/check_xxx/main.c b/tests/apis/check_xxx/main.c
index 5549c309f..5e40e6691 100644
--- a/tests/apis/check_xxx/main.c
+++ b/tests/apis/check_xxx/main.c
@@ -1,3 +1,4 @@
+#include "config.h"
int main(int argc, char** argv)
{
diff --git a/tests/apis/check_xxx/xmake.lua b/tests/apis/check_xxx/xmake.lua
index 2a9916954..ffd9f9242 100644
--- a/tests/apis/check_xxx/xmake.lua
+++ b/tests/apis/check_xxx/xmake.lua
@@ -9,6 +9,7 @@ includes("check_cincludes.lua")
target("test")
set_kind("binary")
add_files("*.c")
+ add_includedirs("$(buildir)")
add_configfiles("config.h.in")
check_ctypes("HAS_WCHAR", "wchar_t")
@@ -25,3 +26,5 @@ target("test")
configvar_check_cflags("HAS_SSE2", "-msse2")
configvar_check_csnippets("HAS_LONG_8", "return (sizeof(long) == 8)? 0 : -1;", {tryrun = true})
configvar_check_csnippets("PTR_SIZE", 'printf("%d", sizeof(void*)); return 0;', {output = true, number = true})
+ configvar_check_csnippets("HAVE_VISIBILITY", 'extern __attribute__((__visibility__("hidden"))) int hiddenvar;', {default = 0})
+ configvar_check_csnippets("CUSTOM_ASSERT=assert", 'assert(1);', {default = "", quote = false})