<commit_before># The core tests need relaxed compiler flags...
# TODO fix core tests to compile without these additional no-error flags
if(MSVC_VERSION)
  # disable deprecated warnings (they would lead to errors)
  mitkFunctionCheckCAndCXXCompilerFlags("/wd4996" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
else()
  mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=deprecated" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
  mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=deprecated-declarations" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()

MITK_CREATE_MODULE_TESTS(US_MODULE)
if(TARGET ${TESTDRIVER})
  mitk_use_modules(TARGET ${TESTDRIVER} PACKAGES ITK|ITKThresholding+ITKTestKernel VTK|vtkTestingRendering tinyxml)

  mitkAddCustomModuleTest(mitkVolumeCalculatorTest_Png2D-bw mitkVolumeCalculatorTest
                          ${MITK_DATA_DIR}/Png2D-bw.png
                          ${MITK_DATA_DIR}/Pic2DplusT.nrrd
  )

  mitkAddCustomModuleTest(mitkEventMapperTest_Test1And2 mitkEventMapperTest
                          ${MITK_DATA_DIR}/TestStateMachine1.xml
                          ${MITK_DATA_DIR}/TestStateMachine2.xml
  )

  mitkAddCustomModuleTest(mitkEventConfigTest_CreateObjectInDifferentWays mitkEventConfigTest
                          ${MITK_SOURCE_DIR}/Modules/Core/tests/resources/Interactions/StatemachineConfigTest.xml
  )

  mitkAddCustomModuleTest(mitkNodeDependentPointSetInteractorTest mitkNodeDependentPointSetInteractorTest
                          ${MITK_DATA_DIR}/Pic3D.nrrd
                          ${MITK_DATA_DIR}/BallBinary30x30x30.nrrd
  )

  mitkAddCustomModuleTest(mitkDataStorageTest_US4DCyl mitkDataStorageTest
                          ${MITK_DATA_DIR}/US4DCyl.nrrd
  )

  mitkAddCustomModuleTest(mitkStateMachineFactoryTest_TestStateMachine1_2 mitkStateMachineFactoryTest
                          ${MITK_DATA_DIR}/TestStateMachine1.xml
                          ${MITK_DATA_DIR}/TestStateMachine2.xml
  )

  mitkAddCustomModuleTest(mitkDicomSeriesReaderTest_CTImage mitkDicomSeriesReaderTest
                          ${MITK_DATA_DIR}/TinyCTAbdomen
                          ${MITK_DATA_DIR}/DICOMReader/Broken-Series
  )
<commit_msg>Fixed resource path for unit test.<commit_after># The core tests need relaxed compiler flags...
# TODO fix core tests to compile without these additional no-error flags
if(MSVC_VERSION)
  # disable deprecated warnings (they would lead to errors)
  mitkFunctionCheckCAndCXXCompilerFlags("/wd4996" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
else()
  mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=deprecated" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
  mitkFunctionCheckCAndCXXCompilerFlags("-Wno-error=deprecated-declarations" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
endif()

MITK_CREATE_MODULE_TESTS(US_MODULE)
if(TARGET ${TESTDRIVER})
  mitk_use_modules(TARGET ${TESTDRIVER} PACKAGES ITK|ITKThresholding+ITKTestKernel VTK|vtkTestingRendering tinyxml)

  mitkAddCustomModuleTest(mitkVolumeCalculatorTest_Png2D-bw mitkVolumeCalculatorTest
                          ${MITK_DATA_DIR}/Png2D-bw.png
                          ${MITK_DATA_DIR}/Pic2DplusT.nrrd
  )

  mitkAddCustomModuleTest(mitkEventMapperTest_Test1And2 mitkEventMapperTest
                          ${MITK_DATA_DIR}/TestStateMachine1.xml
                          ${MITK_DATA_DIR}/TestStateMachine2.xml
  )

  mitkAddCustomModuleTest(mitkEventConfigTest_CreateObjectInDifferentWays mitkEventConfigTest
                          ${MITK_SOURCE_DIR}/Modules/Core/tests/resource/Interactions/StatemachineConfigTest.xml
  )

  mitkAddCustomModuleTest(mitkNodeDependentPointSetInteractorTest mitkNodeDependentPointSetInteractorTest
                          ${MITK_DATA_DIR}/Pic3D.nrrd
                          ${MITK_DATA_DIR}/BallBinary30x30x30.nrrd
  )

  mitkAddCustomModuleTest(mitkDataStorageTest_US4DCyl mitkDataStorageTest
                          ${MITK_DATA_DIR}/US4DCyl.nrrd
  )

  mitkAddCustomModuleTest(mitkStateMachineFactoryTest_TestStateMachine1_2 mitkStateMachineFactoryTest
                          ${MITK_DATA_DIR}/TestStateMachine1.xml
                          ${MITK_DATA_DIR}/TestStateMachine2.xml
  )

  mitkAddCustomModuleTest(mitkDicomSeriesReaderTest_CTImage mitkDicomSeriesReaderTest
                          ${MITK_DATA_DIR}/TinyCTAbdomen
                          ${MITK_DATA_DIR}/DICOMReader/Broken-Series
  )

{'fraction_non_alphanumeric': 0.0622109158186864, 'fraction_numerical': 0.011100832562442183, 'mean_word_length': 3.454170957775489, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 12}, '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': '6696573', 'n_tokens_mistral': 1394, 'n_tokens_neox': 1341, 'n_words': 153}