<commit_before>hunter_add_package(GTest)
find_package(GMock CONFIG REQUIRED)

include(../cmake/Sugar)
include(sugar_add_gtest)

option(NE_ENABLE_MEMCHECK "Enable valgrind when running tests." ON)
find_program(CTEST_MEMORYCHECK_COMMAND valgrind)
set(CTEST_MEMORYCHECK_COMMAND_OPTIONS --trace-children=yes --leak-check=full)

function(add_mem_test name)
  if (CTEST_MEMORYCHECK_COMMAND AND NE_ENABLE_MEMCHECK AND NOT APPLE AND NOT ANDROID)
    message(STATUS "Adding valgrind test for ${name}.")
    set(MEMCHECK_PARAMS ${CTEST_MEMORYCHECK_COMMAND} ${CTEST_MEMORYCHECK_COMMAND_OPTIONS} $<TARGET_FILE:${name}>)
    add_test(NAME ${name} COMMAND ${MEMCHECK_PARAMS})
  else()
    message(STATUS "Adding test for ${name}.")
    sugar_add_gtest(${name} ${name})
  endif()
endfunction()

include_directories(.)

add_executable(stream_coder_pipe_test stream_coder_pipe_test.cc)
target_link_libraries(stream_coder_pipe_test nekit GMock::main)
add_mem_test(stream_coder_pipe_test)<commit_msg>Do not test on android<commit_after>hunter_add_package(GTest)
find_package(GMock CONFIG REQUIRED)

include(../cmake/Sugar)
include(sugar_add_gtest)

option(NE_ENABLE_MEMCHECK "Enable valgrind when running tests." ON)
find_program(CTEST_MEMORYCHECK_COMMAND valgrind)
set(CTEST_MEMORYCHECK_COMMAND_OPTIONS --trace-children=yes --leak-check=full)

function(add_mem_test name)
  if (CTEST_MEMORYCHECK_COMMAND AND NE_ENABLE_MEMCHECK AND NOT APPLE AND NOT ANDROID)
    message(STATUS "Adding valgrind test for ${name}.")
    set(MEMCHECK_PARAMS ${CTEST_MEMORYCHECK_COMMAND} ${CTEST_MEMORYCHECK_COMMAND_OPTIONS} $<TARGET_FILE:${name}>)
    add_test(NAME ${name} COMMAND ${MEMCHECK_PARAMS})
  elseif(NOT ANDROID)
    message(STATUS "Adding test for ${name}.")
    sugar_add_gtest(${name} ${name})
  endif()
endfunction()

include_directories(.)

add_executable(stream_coder_pipe_test stream_coder_pipe_test.cc)
target_link_libraries(stream_coder_pipe_test nekit GMock::main)
add_mem_test(stream_coder_pipe_test)
{'fraction_non_alphanumeric': 0.10181451612903226, 'fraction_numerical': 0.0, 'mean_word_length': 8.105504587155963, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4291174', 'n_tokens_mistral': 726, 'n_tokens_neox': 713, 'n_words': 126}