2020-04-10 00:08:36 +08:00
|
|
|
# Most tests need test data, and many need windows headers.
|
2020-05-03 07:48:29 +08:00
|
|
|
link_libraries(simdjson-internal-flags test-data simdjson-windows-headers)
|
2020-06-24 01:12:19 +08:00
|
|
|
include(${PROJECT_SOURCE_DIR}/cmake/add_cpp_test.cmake)
|
2021-05-01 06:33:45 +08:00
|
|
|
add_subdirectory(dom)
|
2020-09-27 02:40:35 +08:00
|
|
|
add_subdirectory(ondemand)
|
|
|
|
|
2020-04-07 00:55:10 +08:00
|
|
|
|
|
|
|
# All remaining tests link with simdjson proper
|
2020-04-06 23:24:54 +08:00
|
|
|
link_libraries(simdjson)
|
2020-12-23 04:25:16 +08:00
|
|
|
|
2021-05-01 06:33:45 +08:00
|
|
|
add_cpp_test(unicode_tests LABELS dom acceptance per_implementation)
|
2020-12-23 04:33:57 +08:00
|
|
|
add_cpp_test(minify_tests LABELS other acceptance per_implementation)
|
|
|
|
add_cpp_test(padded_string_tests LABELS other acceptance )
|
2020-06-23 04:12:37 +08:00
|
|
|
|
2021-05-01 06:33:45 +08:00
|
|
|
if(MSVC AND BUILD_SHARED_LIBS)
|
|
|
|
# Copy the simdjson dll into the tests directory
|
|
|
|
add_custom_command(TARGET unicode_tests POST_BUILD # Adds a post-build event
|
2019-08-05 03:41:00 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different # which executes "cmake -E copy_if_different..."
|
|
|
|
"$<TARGET_FILE:simdjson>" # <--this is in-file
|
2021-05-01 06:33:45 +08:00
|
|
|
"$<TARGET_FILE_DIR:unicode_tests>") # <--this is out-file path
|
2019-08-05 03:41:00 +08:00
|
|
|
endif()
|
|
|
|
|
2021-05-01 06:33:45 +08:00
|
|
|
# This tests validates that the implementation is what we think it is if we get passed
|
|
|
|
# SIMDJSON_FORCE_IMPLEMENTATION, so we know we're testing what we think we're testing
|
|
|
|
add_cpp_test(checkimplementation LABELS other per_implementation)
|
2020-07-01 07:36:26 +08:00
|
|
|
|
2020-04-15 15:57:52 +08:00
|
|
|
add_subdirectory(compilation_failure_tests)
|