<commit_before># Find tests generated in the binary directory
message("GENERATED TESTS DIR ${CMAKE_CURRENT_BINARY_DIR}")
message("GENERATED TESTS ${GENERATED_FILTER_LIST}")

# To add a new file, just add it to this list.  Any GoogleTests inside will be automatically
# added to ctest.
set ( CYCLUS_TEST_CORE 
  # -- do not change this order
  ${CMAKE_CURRENT_SOURCE_DIR}/TableTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/DatabaseTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/BookKeeperTests.cpp
  # --
  ${CMAKE_CURRENT_SOURCE_DIR}/BuildingManagerTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/CompMapTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/DecayHandlerTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/InstModelClassTests.cpp 
  ${CMAKE_CURRENT_SOURCE_DIR}/IsoVectorTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/MarketPlayerTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/MaterialTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/MessageTests.cpp
  #${CMAKE_CURRENT_SOURCE_DIR}/QueryEngineTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/RegionModelClassTests.cpp 
  ${CMAKE_CURRENT_SOURCE_DIR}/ResourceBuffTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/SDManagerTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/XMLParserTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/XMLFileLoaderTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/XMLQueryEngineTests.cpp
  PARENT_SCOPE)

# Add all the tests by parsing the source code
# This macro searches for GoogleTest macros and adds them as tests automatically
macro(ADD_GOOGLE_TESTS executable)
  # Add the generated tests
  set ( AllTestsHits ${GENERATED_TEST_LIST} )

  foreach ( source ${ARGN} )
    file(READ "${source}" contents)

    # Find all test lists
    string(REGEX MATCHALL "TEST_?[FP]?\\(([A-Za-z_0-9 ,_]+)\\)" AllTests ${contents})

    # Convert the C++ code into a short test name
    foreach(hit ${AllTests})
      string(REGEX REPLACE ".*\\(( *[A-Za-z_0-9]+)[, ]*([A-Za-z_0-9]+) *\\).*" "\\1.\\2" test_name ${hit})
      set ( AllTestsHits ${AllTestsHits} ${test_name} )
    endforeach()
  endforeach()

  list ( SORT AllTestsHits )
  # Add all the remaining tests to CTest's test list
  foreach(hit ${AllTestsHits})
    add_test(${hit} ${executable} --gtest_filter=${hit})
  endforeach()
endmacro()

INSTALL(FILES GoogleTest/gtest/gtest.h
  DESTINATION cyclus/include/gtest
  COMPONENT testing
  )

INSTALL(FILES 
  ModelTests.cpp
  ModelTests.h
  FacilityModelTests.cpp
  FacilityModelTests.h
  InstModelTests.cpp
  InstModelTests.h
  RegionModelTests.cpp
  RegionModelTests.h
  BuildingManagerTests.h
  ConverterModelTests.cpp
  ConverterModelTests.h
  MarketModelTests.cpp
  MarketModelTests.h
  MarketPlayerTests.h
  SDManagerTests.h
  StubModelTests.cpp
  StubModelTests.h
  StubCommModelTests.cpp
  StubCommModelTests.h
  XMLParserTests.cpp
  XMLParserTests.h
  DESTINATION cyclus/include
  COMPONENT testing
  )<commit_msg>final commit here, making sure we install all test header files<commit_after># Find tests generated in the binary directory
message("GENERATED TESTS DIR ${CMAKE_CURRENT_BINARY_DIR}")
message("GENERATED TESTS ${GENERATED_FILTER_LIST}")

# To add a new file, just add it to this list.  Any GoogleTests inside will be automatically
# added to ctest.
set ( CYCLUS_TEST_CORE 
  # -- do not change this order
  ${CMAKE_CURRENT_SOURCE_DIR}/TableTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/DatabaseTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/BookKeeperTests.cpp
  # --
  ${CMAKE_CURRENT_SOURCE_DIR}/BuildingManagerTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/CompMapTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/DecayHandlerTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/InstModelClassTests.cpp 
  ${CMAKE_CURRENT_SOURCE_DIR}/IsoVectorTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/MarketPlayerTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/MaterialTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/MessageTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/RegionModelClassTests.cpp 
  ${CMAKE_CURRENT_SOURCE_DIR}/ResourceBuffTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/SDManagerTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/XMLParserTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/XMLFileLoaderTests.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/XMLQueryEngineTests.cpp
  PARENT_SCOPE)

# Add all the tests by parsing the source code
# This macro searches for GoogleTest macros and adds them as tests automatically
macro(ADD_GOOGLE_TESTS executable)
  # Add the generated tests
  set ( AllTestsHits ${GENERATED_TEST_LIST} )

  foreach ( source ${ARGN} )
    file(READ "${source}" contents)

    # Find all test lists
    string(REGEX MATCHALL "TEST_?[FP]?\\(([A-Za-z_0-9 ,_]+)\\)" AllTests ${contents})

    # Convert the C++ code into a short test name
    foreach(hit ${AllTests})
      string(REGEX REPLACE ".*\\(( *[A-Za-z_0-9]+)[, ]*([A-Za-z_0-9]+) *\\).*" "\\1.\\2" test_name ${hit})
      set ( AllTestsHits ${AllTestsHits} ${test_name} )
    endforeach()
  endforeach()

  list ( SORT AllTestsHits )
  # Add all the remaining tests to CTest's test list
  foreach(hit ${AllTestsHits})
    add_test(${hit} ${executable} --gtest_filter=${hit})
  endforeach()
endmacro()

INSTALL(FILES GoogleTest/gtest/gtest.h
  DESTINATION cyclus/include/gtest
  COMPONENT testing
  )

FILE(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.h")
INSTALL(FILES ${files} 
  DESTINATION cyclus/include
  COMPONENT testing
  )
{'fraction_non_alphanumeric': 0.11091887735486351, 'fraction_numerical': 0.0030757400999615533, 'mean_word_length': 5.05, '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': '5494747', 'n_tokens_mistral': 1844, 'n_tokens_neox': 1743, 'n_words': 354}