<commit_before>add_library(unit_test_main main.cpp)

add_executable(run_test_version version.cpp)
target_link_libraries(run_test_version gtest unit_test_main)
add_test(NAME version COMMAND run_test_version)<commit_msg>Add CMake macro for testing<commit_after>add_library(unit_test_main main.cpp)

macro(add_unit_test test_name)
  set(target_name run_test_${test_name})
  add_executable(${target_name} ${test_name}.cpp)
  target_link_libraries(${target_name} gtest unit_test_main)
  add_test(NAME test_${test_name} COMMAND ${target_name})
endmacro(add_unit_test)

add_unit_test(version)
{'fraction_non_alphanumeric': 0.08888888888888889, 'fraction_numerical': 0.0, 'mean_word_length': 11.73913043478261, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4361746', 'n_tokens_mistral': 215, 'n_tokens_neox': 207, 'n_words': 31}