1 add_custom_target(libc-string-tests)
3 add_subdirectory(memory_utils)
41 libc.src.string.memccpy
51 libc.src.string.mempcpy
61 libc.src.string.memmem
71 libc.src.string.memchr
81 libc.src.string.memrchr
91 libc.src.string.rindex
102 libc.src.string.stpcpy
112 libc.src.string.stpncpy
122 libc.src.string.strcat
132 libc.src.string.strchr
143 libc.src.string.strchrnul
153 libc.src.string.strcmp
163 libc.src.string.strcasecmp
173 libc.src.string.strcasestr
183 libc.src.string.strcoll
193 libc.src.string.strcpy
203 libc.src.string.strcspn
214 libc.src.string.strdup
225 libc.src.string.strerror
236 libc.src.string.strerror_r
246 libc.src.string.strlcat
256 libc.src.string.strlcpy
266 libc.src.string.strlen
276 libc.src.string.strncat
286 libc.src.string.strncmp
296 libc.src.string.strncasecmp
306 libc.src.string.strncpy
317 libc.src.string.strndup
327 libc.src.string.strnlen
337 libc.src.string.strpbrk
347 libc.src.string.strrchr
358 libc.src.string.strsep
368 libc.src.string.strsignal
378 libc.src.string.strspn
388 libc.src.string.strstr
398 libc.src.string.strtok
408 libc.src.string.strtok_r
418 libc.src.string.strxfrm
421 # Tests all implementations that can run on the target CPU.
422 function(add_libc_multi_impl_test name)
423 get_property(fq_implementations GLOBAL PROPERTY ${name}_implementations)
424 foreach(fq_config_name IN LISTS fq_implementations)
425 get_target_property(required_cpu_features ${fq_config_name} REQUIRE_CPU_FEATURES)
426 cpu_supports(can_run "${required_cpu_features}")
428 string(FIND ${fq_config_name} "." last_dot_loc REVERSE)
429 math(EXPR name_loc "${last_dot_loc} + 1")
430 string(SUBSTRING ${fq_config_name} ${name_loc} -1 target_name)
436 ${LIBC_COMPILE_OPTIONS_NATIVE}
442 libc.src.__support.macros.sanitizer
444 get_fq_target_name(${fq_config_name}_test fq_target_name)
446 message(STATUS "Skipping test for '${fq_config_name}' insufficient host cpu features '${required_cpu_features}'")
451 add_libc_multi_impl_test(bcmp SRCS bcmp_test.cpp)
452 add_libc_multi_impl_test(bzero SRCS bzero_test.cpp)
453 add_libc_multi_impl_test(memcmp SRCS memcmp_test.cpp)
454 add_libc_multi_impl_test(memcpy SRCS memcpy_test.cpp)
455 add_libc_multi_impl_test(memmove SRCS memmove_test.cpp)
456 add_libc_multi_impl_test(memset SRCS memset_test.cpp)