<commit_before>cmake_minimum_required (VERSION 2.8.8)
project (INS_Node_Test_Suite)
find_package (Threads)

add_subdirectory(arduino_mock)
set(INS_MOCK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ins_mock)
set(STUBS ${CMAKE_CURRENT_SOURCE_DIR}/stubs)
set(UT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ut)
set(GTEST_RUN_FLAGS --gtest_color=yes --gtest_repeat=5 --gtest_shuffle)

# Include lcov for coverage reports
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../CmakeModules)
include(CodeCoverage)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")

enable_testing()

include_directories(
    ${ARDUINO_MOCK_INCLUDE_DIRS}
    ${ARDUINO_MOCK_LIBS_DIR}/lib/gtest/gtest/src/gtest/include
    ${ARDUINO_MOCK_LIBS_DIR}/lib/gmock/gmock/src/gmock/include
    ${INS_MOCK_DIR}
    ${STUBS}
)

# Include all files in ut/ ending with .cc as tests
file(GLOB TESTS ${UT_DIR}/*.cc)
# Iterate through the files inside the unit tests folder
foreach(test ${TESTS})
    # Print the included path
    MESSAGE(STATUS "Included test file: " ${test})
    # Remove the file ending and the path, leaving just the file name
    string(REPLACE ".cc" "" testname ${test})
    string(REPLACE ${UT_DIR}/ "" testname ${testname})<commit_msg>Build tests with C++14<commit_after>cmake_minimum_required (VERSION 2.8.8)
project (INS_Node_Test_Suite)
find_package (Threads)

add_subdirectory(arduino_mock)
set(INS_MOCK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ins_mock)
set(STUBS ${CMAKE_CURRENT_SOURCE_DIR}/stubs)
set(UT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ut)
set(GTEST_RUN_FLAGS --gtest_color=yes --gtest_repeat=5 --gtest_shuffle)

# Include lcov for coverage reports
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../CmakeModules)
include(CodeCoverage)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -g -O0 -fprofile-arcs -ftest-coverage")

enable_testing()

include_directories(
    ${ARDUINO_MOCK_INCLUDE_DIRS}
    ${ARDUINO_MOCK_LIBS_DIR}/lib/gtest/gtest/src/gtest/include
    ${ARDUINO_MOCK_LIBS_DIR}/lib/gmock/gmock/src/gmock/include
    ${INS_MOCK_DIR}
    ${STUBS}
)

# Include all files in ut/ ending with .cc as tests
file(GLOB TESTS ${UT_DIR}/*.cc)
# Iterate through the files inside the unit tests folder
foreach(test ${TESTS})
    # Print the included path
    MESSAGE(STATUS "Included test file: " ${test})
    # Remove the file ending and the path, leaving just the file name
    string(REPLACE ".cc" "" testname ${test})
    string(REPLACE ${UT_DIR}/ "" testname ${testname})
{'fraction_non_alphanumeric': 0.12228479485116653, 'fraction_numerical': 0.0056315366049879325, 'mean_word_length': 5.510471204188482, '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': '6410459', 'n_tokens_mistral': 956, 'n_tokens_neox': 911, 'n_words': 189}