diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Makefile | 5 | ||||
| -rw-r--r-- | tests/common.h | 3 | ||||
| -rw-r--r-- | tests/test_compile.c | 2 | ||||
| -rw-r--r-- | tests/test_fread_overwrite_dynamic.c | 3 | ||||
| -rw-r--r-- | tests/test_fread_overwrite_static.c | 3 | ||||
| -rw-r--r-- | tests/test_fwrite_overwrite_dynamic.c | 3 | ||||
| -rw-r--r-- | tests/test_fwrite_overwrite_static.c | 3 | ||||
| -rw-r--r-- | tests/test_getdomainname_dynamic.c | 5 | ||||
| -rw-r--r-- | tests/test_getdomainname_static.c | 5 | ||||
| -rw-r--r-- | tests/test_mbstowcs_dynamic.c | 2 | ||||
| -rw-r--r-- | tests/test_mbstowcs_static.c | 2 |
11 files changed, 20 insertions, 16 deletions
diff --git a/tests/Makefile b/tests/Makefile index 333f088..a8c7ac5 100644 --- a/tests/Makefile +++ b/tests/Makefile | |||
| @@ -159,7 +159,10 @@ clang: CFLAGS+=-I../x86_64-linux-musl-native/include/ | |||
| 159 | clang: CFLAGS+=-Ix86_64-linux-musl-native/include/ | 159 | clang: CFLAGS+=-Ix86_64-linux-musl-native/include/ |
| 160 | clang: CFLAGS+=-nostdinc | 160 | clang: CFLAGS+=-nostdinc |
| 161 | clang: CXX=clang++ | 161 | clang: CXX=clang++ |
| 162 | clang: CXXFLAGS=$(CFLAGS) | 162 | clang: CXXFLAGS+=-I/usr/include/x86_64-linux-musl |
| 163 | clang: CXXFLAGS+=-I../x86_64-linux-musl-native/include/ | ||
| 164 | clang: CXXFLAGS+=-Ix86_64-linux-musl-native/include/ | ||
| 165 | clang: CXXFLAGS+=-nostdinc | ||
| 163 | clang: comptime $(RUNTIME_TARGETS) cpp | 166 | clang: comptime $(RUNTIME_TARGETS) cpp |
| 164 | 167 | ||
| 165 | coverage: CFLAGS += -fprofile-arcs -ftest-coverage | 168 | coverage: CFLAGS += -fprofile-arcs -ftest-coverage |
diff --git a/tests/common.h b/tests/common.h index 4c34862..6a30739 100644 --- a/tests/common.h +++ b/tests/common.h | |||
| @@ -15,6 +15,9 @@ | |||
| 15 | License along with the GNU C Library; if not, see | 15 | License along with the GNU C Library; if not, see |
| 16 | <https://www.gnu.org/licenses/>. */ | 16 | <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | #define _POSIX_C_SOURCE 1 | ||
| 19 | #define _XOPEN_SOURCE 700 | ||
| 20 | |||
| 18 | #include <setjmp.h> | 21 | #include <setjmp.h> |
| 19 | #include <unistd.h> | 22 | #include <unistd.h> |
| 20 | #include <signal.h> | 23 | #include <signal.h> |
diff --git a/tests/test_compile.c b/tests/test_compile.c index edbbb27..b794306 100644 --- a/tests/test_compile.c +++ b/tests/test_compile.c | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #include <sys/socket.h> | 12 | #include <sys/socket.h> |
| 13 | #include <sys/stat.h> | 13 | #include <sys/stat.h> |
| 14 | 14 | ||
| 15 | // Check that all headers are compiling. | 15 | /* Check that all headers are compiling.*/ |
| 16 | int main(int argc, char** argv) { | 16 | int main(int argc, char** argv) { |
| 17 | return 0; | 17 | return 0; |
| 18 | } | 18 | } |
diff --git a/tests/test_fread_overwrite_dynamic.c b/tests/test_fread_overwrite_dynamic.c index 74953d6..b108dc5 100644 --- a/tests/test_fread_overwrite_dynamic.c +++ b/tests/test_fread_overwrite_dynamic.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | #include <assert.h> | ||
| 2 | |||
| 3 | #include "common.h" | 1 | #include "common.h" |
| 4 | 2 | ||
| 3 | #include <assert.h> | ||
| 5 | #include <stdio.h> | 4 | #include <stdio.h> |
| 6 | 5 | ||
| 7 | int main(int argc, char** argv) { | 6 | int main(int argc, char** argv) { |
diff --git a/tests/test_fread_overwrite_static.c b/tests/test_fread_overwrite_static.c index e9de2ce..16a5e30 100644 --- a/tests/test_fread_overwrite_static.c +++ b/tests/test_fread_overwrite_static.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | #include <assert.h> | ||
| 2 | |||
| 3 | #include "common.h" | 1 | #include "common.h" |
| 4 | 2 | ||
| 3 | #include <assert.h> | ||
| 5 | #include <stdio.h> | 4 | #include <stdio.h> |
| 6 | 5 | ||
| 7 | int main(int argc, char** argv) { | 6 | int main(int argc, char** argv) { |
diff --git a/tests/test_fwrite_overwrite_dynamic.c b/tests/test_fwrite_overwrite_dynamic.c index a7f2b1b..7da64ab 100644 --- a/tests/test_fwrite_overwrite_dynamic.c +++ b/tests/test_fwrite_overwrite_dynamic.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | #include <assert.h> | ||
| 2 | |||
| 3 | #include "common.h" | 1 | #include "common.h" |
| 4 | 2 | ||
| 3 | #include <assert.h> | ||
| 5 | #include <stdio.h> | 4 | #include <stdio.h> |
| 6 | 5 | ||
| 7 | int main(int argc, char** argv) { | 6 | int main(int argc, char** argv) { |
diff --git a/tests/test_fwrite_overwrite_static.c b/tests/test_fwrite_overwrite_static.c index 492fb47..f844af8 100644 --- a/tests/test_fwrite_overwrite_static.c +++ b/tests/test_fwrite_overwrite_static.c | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | #include <assert.h> | ||
| 2 | |||
| 3 | #include "common.h" | 1 | #include "common.h" |
| 4 | 2 | ||
| 3 | #include <assert.h> | ||
| 5 | #include <stdio.h> | 4 | #include <stdio.h> |
| 6 | 5 | ||
| 7 | int main(int argc, char** argv) { | 6 | int main(int argc, char** argv) { |
diff --git a/tests/test_getdomainname_dynamic.c b/tests/test_getdomainname_dynamic.c index a7882ba..3c15b8e 100644 --- a/tests/test_getdomainname_dynamic.c +++ b/tests/test_getdomainname_dynamic.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #define _GNU_SOURCE | 1 | #define _GNU_SOURCE |
| 2 | #define _DEFAULT_SOURCE | ||
| 3 | |||
| 4 | #include "common.h" | ||
| 4 | 5 | ||
| 5 | #include <unistd.h> | 6 | #include <unistd.h> |
| 6 | 7 | ||
diff --git a/tests/test_getdomainname_static.c b/tests/test_getdomainname_static.c index a7671c4..478a274 100644 --- a/tests/test_getdomainname_static.c +++ b/tests/test_getdomainname_static.c | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #define _GNU_SOURCE | 1 | #define _GNU_SOURCE |
| 2 | #define _DEFAULT_SOURCE | ||
| 3 | |||
| 4 | #include "common.h" | ||
| 4 | 5 | ||
| 5 | #include <unistd.h> | 6 | #include <unistd.h> |
| 6 | 7 | ||
diff --git a/tests/test_mbstowcs_dynamic.c b/tests/test_mbstowcs_dynamic.c index 1465bfd..fd02ed9 100644 --- a/tests/test_mbstowcs_dynamic.c +++ b/tests/test_mbstowcs_dynamic.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
| 4 | 4 | ||
| 5 | int main(int argc, char** argv) { | 5 | int main(int argc, char** argv) { |
| 6 | const char* mbstr = "z\u00df\u6c34\U0001f34c"; // or u8"zß水🍌" | 6 | const char* mbstr = "z\u00df\u6c34\U0001f34c"; /* or u8"zß水🍌" */ |
| 7 | wchar_t wstr[5]; | 7 | wchar_t wstr[5]; |
| 8 | mbstowcs(wstr, mbstr, 4); | 8 | mbstowcs(wstr, mbstr, 4); |
| 9 | 9 | ||
diff --git a/tests/test_mbstowcs_static.c b/tests/test_mbstowcs_static.c index a15c4d6..847fcf7 100644 --- a/tests/test_mbstowcs_static.c +++ b/tests/test_mbstowcs_static.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
| 4 | 4 | ||
| 5 | int main(int argc, char** argv) { | 5 | int main(int argc, char** argv) { |
| 6 | const char* mbstr = "z\u00df\u6c34\U0001f34c"; // or u8"zß水🍌" | 6 | const char* mbstr = "z\u00df\u6c34\U0001f34c"; /* or u8"zß水🍌" */ |
| 7 | wchar_t wstr[5]; | 7 | wchar_t wstr[5]; |
| 8 | mbstowcs(wstr, mbstr, 4); | 8 | mbstowcs(wstr, mbstr, 4); |
| 9 | 9 | ||
