<commit_before>set(TESTS
    TestDns
)

foreach(_test ${TESTS})
    add_executable(${_test} ${_test}.cpp)
    set_target_properties(${_test} PROPERTIES
        CXX_STANDARD 11
    )
    target_include_directories(${_test} PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
    target_link_libraries(${_test} qmdnsengine Qt5::Test)
    add_test(NAME ${_test}
        COMMAND ${_test}
    )
endforeach()<commit_msg>Copy DLL to current directory for running the tests on Windows.<commit_after>set(TESTS
    TestDns
)

foreach(_test ${TESTS})
    add_executable(${_test} ${_test}.cpp)
    set_target_properties(${_test} PROPERTIES
        CXX_STANDARD 11
    )
    target_include_directories(${_test} PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
    target_link_libraries(${_test} qmdnsengine Qt5::Test)
    add_test(NAME ${_test}
        COMMAND ${_test}
    )
endforeach()

# On Windows, the tests will not run without the DLL located in the current
# directory - a target must be used to copy it here once built
if(WIN32)
    add_custom_target(qmdnsengine-copy ALL
        "${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:qmdnsengine>" "${CMAKE_CURRENT_BINARY_DIR}"
        DEPENDS qmdnsengine
    )
endif()
{'fraction_non_alphanumeric': 0.1098993288590604, 'fraction_numerical': 0.006711409395973154, 'mean_word_length': 4.255506607929515, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5408479', 'n_tokens_mistral': 425, 'n_tokens_neox': 406, 'n_words': 88}