From fc9bc538d1abb03e05c1d2c6d6e436d8dcd5ac31 Mon Sep 17 00:00:00 2001 From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de> Date: Tue, 27 Jul 2021 15:58:55 +0200 Subject: [PATCH] split Test/Unit coording to kernel subdirectories --- CMakeLists.txt | 4 ++++ Tests/Unit/Core/FitObjectiveTest.cpp | 2 +- Tests/Unit/Core/SimDataPairTest.cpp | 2 +- Tests/Unit/{Core => Device}/ArrayUtilsTest.cpp | 0 Tests/Unit/{Core => Device}/BeamFootprintTest.cpp | 0 Tests/Unit/{Core => Device}/BeamTest.cpp | 0 Tests/Unit/Device/CMakeLists.txt | 10 ++++++++++ Tests/Unit/{Core => Device}/ConstKBinAxisTest.cpp | 0 Tests/Unit/{Core => Device}/CumulativeValueTest.cpp | 0 Tests/Unit/{Core => Device}/CustomBinAxisTest.cpp | 0 .../Unit/{Core => Device}/DepthProbeConverterTest.cpp | 0 Tests/Unit/{Core => Device}/DetectorMaskTest.cpp | 0 Tests/Unit/{Core => Device}/FixedBinAxisTest.cpp | 0 Tests/Unit/{Core => Device}/Histogram1DTest.cpp | 0 Tests/Unit/{Core => Device}/Histogram2DTest.cpp | 0 Tests/Unit/{Core => Device}/IOReaderWriterTest.cpp | 0 .../{Core => Device}/IntensityDataFunctionsTest.cpp | 0 Tests/Unit/{Core => Device}/LLDataTest.cpp | 0 .../Unit/{Core => Device}/OffSpecularConverterTest.cpp | 0 Tests/Unit/{Core => Device}/OutputDataIteratorTest.cpp | 0 Tests/Unit/{Core => Device}/OutputDataTest.cpp | 0 Tests/Unit/{Core => Device}/PointwiseAxisTest.cpp | 0 Tests/Unit/{Core => Device}/PolygonTest.cpp | 0 .../Unit/{Core => Device}/RectangularConverterTest.cpp | 0 Tests/Unit/{Core => Device}/RegionOfInterestTest.cpp | 0 Tests/Unit/{Core => Device}/ScanResolutionTest.cpp | 0 Tests/Unit/{Core => Device}/Shape2DTest.cpp | 0 Tests/Unit/{Core => Device}/SimulationAreaTest.cpp | 0 Tests/Unit/{Core => Device}/SpectrumTest.cpp | 0 Tests/Unit/{Core => Device}/SpecularDetector1DTest.cpp | 0 Tests/Unit/{Core => Device}/SphericalConverterTest.cpp | 0 Tests/Unit/{Core => Device}/SphericalDetectorTest.cpp | 0 Tests/Unit/{Core => Device}/VariableBinAxisTest.cpp | 0 Tests/Unit/{Core => }/FittingTestHelper.h | 0 Tests/Unit/Param/CMakeLists.txt | 10 ++++++++++ Tests/Unit/{Core => Param}/DistributionHandlerTest.cpp | 0 Tests/Unit/{Core => Param}/DistributionsTest.cpp | 0 Tests/Unit/{Core => Param}/INodeTest.cpp | 0 Tests/Unit/{Core => Param}/IParameterizedTest.cpp | 0 .../Unit/{Core => Param}/ParameterDistributionTest.cpp | 0 Tests/Unit/{Core => Param}/PolarizationHandlerTest.cpp | 0 Tests/Unit/{Core => Param}/PrecomputedTest.cpp | 0 Tests/Unit/{Core => Param}/RangedDistributionTest.cpp | 0 Tests/Unit/Resample/CMakeLists.txt | 10 ++++++++++ .../{Core => Resample}/FormFactorCoherentSumTest.cpp | 0 Tests/Unit/{Core => Resample}/KzComputationTest.cpp | 0 Tests/Unit/{Core => Resample}/LayerFillLimitsTest.cpp | 0 Tests/Unit/{Core => Resample}/MaterialTest.cpp | 0 .../{Core => Resample}/MatrixRTCoefficientsTest.cpp | 0 .../{Core => Resample}/MultilayerAveragingTest.cpp | 0 Tests/Unit/{Core => Resample}/RTTest.cpp | 0 .../Unit/{Core => Resample}/SimulationElementTest.cpp | 0 Tests/Unit/{Core => Resample}/SpecularMagneticTest.cpp | 0 Tests/Unit/Sample/CMakeLists.txt | 10 ++++++++++ Tests/Unit/{Core => Sample}/CrystalTest.cpp | 0 Tests/Unit/{Core => Sample}/FTDistributionsTest.cpp | 0 Tests/Unit/{Core => Sample}/FormFactorBasicTest.cpp | 0 Tests/Unit/{Core => Sample}/Lattice2DTest.cpp | 0 Tests/Unit/{Core => Sample}/LatticeTest.cpp | 0 Tests/Unit/{Core => Sample}/LayerInterfaceTest.cpp | 0 Tests/Unit/{Core => Sample}/LayerRoughnessTest.cpp | 0 Tests/Unit/{Core => Sample}/LayerTest.cpp | 0 Tests/Unit/{Core => Sample}/MesoCrystalTest.cpp | 0 Tests/Unit/{Core => Sample}/MultiLayerTest.cpp | 0 .../Unit/{Core => Sample}/ParticleCompositionTest.cpp | 0 Tests/Unit/{Core => Sample}/ParticleCoreShellTest.cpp | 0 Tests/Unit/{Core => Sample}/ParticleTest.cpp | 0 Tests/Unit/{Core => Sample}/RotationTest.cpp | 0 Tests/Unit/{Core => Sample}/SampleBuilderNodeTest.cpp | 0 Tests/Unit/{Core => Sample}/ZLimitsTest.cpp | 0 70 files changed, 46 insertions(+), 2 deletions(-) rename Tests/Unit/{Core => Device}/ArrayUtilsTest.cpp (100%) rename Tests/Unit/{Core => Device}/BeamFootprintTest.cpp (100%) rename Tests/Unit/{Core => Device}/BeamTest.cpp (100%) create mode 100644 Tests/Unit/Device/CMakeLists.txt rename Tests/Unit/{Core => Device}/ConstKBinAxisTest.cpp (100%) rename Tests/Unit/{Core => Device}/CumulativeValueTest.cpp (100%) rename Tests/Unit/{Core => Device}/CustomBinAxisTest.cpp (100%) rename Tests/Unit/{Core => Device}/DepthProbeConverterTest.cpp (100%) rename Tests/Unit/{Core => Device}/DetectorMaskTest.cpp (100%) rename Tests/Unit/{Core => Device}/FixedBinAxisTest.cpp (100%) rename Tests/Unit/{Core => Device}/Histogram1DTest.cpp (100%) rename Tests/Unit/{Core => Device}/Histogram2DTest.cpp (100%) rename Tests/Unit/{Core => Device}/IOReaderWriterTest.cpp (100%) rename Tests/Unit/{Core => Device}/IntensityDataFunctionsTest.cpp (100%) rename Tests/Unit/{Core => Device}/LLDataTest.cpp (100%) rename Tests/Unit/{Core => Device}/OffSpecularConverterTest.cpp (100%) rename Tests/Unit/{Core => Device}/OutputDataIteratorTest.cpp (100%) rename Tests/Unit/{Core => Device}/OutputDataTest.cpp (100%) rename Tests/Unit/{Core => Device}/PointwiseAxisTest.cpp (100%) rename Tests/Unit/{Core => Device}/PolygonTest.cpp (100%) rename Tests/Unit/{Core => Device}/RectangularConverterTest.cpp (100%) rename Tests/Unit/{Core => Device}/RegionOfInterestTest.cpp (100%) rename Tests/Unit/{Core => Device}/ScanResolutionTest.cpp (100%) rename Tests/Unit/{Core => Device}/Shape2DTest.cpp (100%) rename Tests/Unit/{Core => Device}/SimulationAreaTest.cpp (100%) rename Tests/Unit/{Core => Device}/SpectrumTest.cpp (100%) rename Tests/Unit/{Core => Device}/SpecularDetector1DTest.cpp (100%) rename Tests/Unit/{Core => Device}/SphericalConverterTest.cpp (100%) rename Tests/Unit/{Core => Device}/SphericalDetectorTest.cpp (100%) rename Tests/Unit/{Core => Device}/VariableBinAxisTest.cpp (100%) rename Tests/Unit/{Core => }/FittingTestHelper.h (100%) create mode 100644 Tests/Unit/Param/CMakeLists.txt rename Tests/Unit/{Core => Param}/DistributionHandlerTest.cpp (100%) rename Tests/Unit/{Core => Param}/DistributionsTest.cpp (100%) rename Tests/Unit/{Core => Param}/INodeTest.cpp (100%) rename Tests/Unit/{Core => Param}/IParameterizedTest.cpp (100%) rename Tests/Unit/{Core => Param}/ParameterDistributionTest.cpp (100%) rename Tests/Unit/{Core => Param}/PolarizationHandlerTest.cpp (100%) rename Tests/Unit/{Core => Param}/PrecomputedTest.cpp (100%) rename Tests/Unit/{Core => Param}/RangedDistributionTest.cpp (100%) create mode 100644 Tests/Unit/Resample/CMakeLists.txt rename Tests/Unit/{Core => Resample}/FormFactorCoherentSumTest.cpp (100%) rename Tests/Unit/{Core => Resample}/KzComputationTest.cpp (100%) rename Tests/Unit/{Core => Resample}/LayerFillLimitsTest.cpp (100%) rename Tests/Unit/{Core => Resample}/MaterialTest.cpp (100%) rename Tests/Unit/{Core => Resample}/MatrixRTCoefficientsTest.cpp (100%) rename Tests/Unit/{Core => Resample}/MultilayerAveragingTest.cpp (100%) rename Tests/Unit/{Core => Resample}/RTTest.cpp (100%) rename Tests/Unit/{Core => Resample}/SimulationElementTest.cpp (100%) rename Tests/Unit/{Core => Resample}/SpecularMagneticTest.cpp (100%) create mode 100644 Tests/Unit/Sample/CMakeLists.txt rename Tests/Unit/{Core => Sample}/CrystalTest.cpp (100%) rename Tests/Unit/{Core => Sample}/FTDistributionsTest.cpp (100%) rename Tests/Unit/{Core => Sample}/FormFactorBasicTest.cpp (100%) rename Tests/Unit/{Core => Sample}/Lattice2DTest.cpp (100%) rename Tests/Unit/{Core => Sample}/LatticeTest.cpp (100%) rename Tests/Unit/{Core => Sample}/LayerInterfaceTest.cpp (100%) rename Tests/Unit/{Core => Sample}/LayerRoughnessTest.cpp (100%) rename Tests/Unit/{Core => Sample}/LayerTest.cpp (100%) rename Tests/Unit/{Core => Sample}/MesoCrystalTest.cpp (100%) rename Tests/Unit/{Core => Sample}/MultiLayerTest.cpp (100%) rename Tests/Unit/{Core => Sample}/ParticleCompositionTest.cpp (100%) rename Tests/Unit/{Core => Sample}/ParticleCoreShellTest.cpp (100%) rename Tests/Unit/{Core => Sample}/ParticleTest.cpp (100%) rename Tests/Unit/{Core => Sample}/RotationTest.cpp (100%) rename Tests/Unit/{Core => Sample}/SampleBuilderNodeTest.cpp (100%) rename Tests/Unit/{Core => Sample}/ZLimitsTest.cpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index b91ec22d53e..2e692f49d23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,6 +177,10 @@ endif() # core tests add_subdirectory(Tests/Unit/Base) +add_subdirectory(Tests/Unit/Param) +add_subdirectory(Tests/Unit/Sample) +add_subdirectory(Tests/Unit/Device) +add_subdirectory(Tests/Unit/Resample) add_subdirectory(Tests/Unit/Core) add_subdirectory(Tests/Unit/Numeric) add_subdirectory(Tests/Performance/Core) diff --git a/Tests/Unit/Core/FitObjectiveTest.cpp b/Tests/Unit/Core/FitObjectiveTest.cpp index 94ed0f4681d..a688e311f55 100644 --- a/Tests/Unit/Core/FitObjectiveTest.cpp +++ b/Tests/Unit/Core/FitObjectiveTest.cpp @@ -1,6 +1,6 @@ #include "Core/Fitting/FitObjective.h" #include "Tests/GTestWrapper/google_test.h" -#include "Tests/Unit/Core/FittingTestHelper.h" +#include "Tests/Unit/FittingTestHelper.h" class FitObjectiveTest : public ::testing::Test { }; diff --git a/Tests/Unit/Core/SimDataPairTest.cpp b/Tests/Unit/Core/SimDataPairTest.cpp index cb6af05d84c..4b61c95c142 100644 --- a/Tests/Unit/Core/SimDataPairTest.cpp +++ b/Tests/Unit/Core/SimDataPairTest.cpp @@ -1,6 +1,6 @@ #include "Core/Fitting/SimDataPair.h" #include "Tests/GTestWrapper/google_test.h" -#include "Tests/Unit/Core/FittingTestHelper.h" +#include "Tests/Unit/FittingTestHelper.h" class SimDataPairTest : public ::testing::Test { }; diff --git a/Tests/Unit/Core/ArrayUtilsTest.cpp b/Tests/Unit/Device/ArrayUtilsTest.cpp similarity index 100% rename from Tests/Unit/Core/ArrayUtilsTest.cpp rename to Tests/Unit/Device/ArrayUtilsTest.cpp diff --git a/Tests/Unit/Core/BeamFootprintTest.cpp b/Tests/Unit/Device/BeamFootprintTest.cpp similarity index 100% rename from Tests/Unit/Core/BeamFootprintTest.cpp rename to Tests/Unit/Device/BeamFootprintTest.cpp diff --git a/Tests/Unit/Core/BeamTest.cpp b/Tests/Unit/Device/BeamTest.cpp similarity index 100% rename from Tests/Unit/Core/BeamTest.cpp rename to Tests/Unit/Device/BeamTest.cpp diff --git a/Tests/Unit/Device/CMakeLists.txt b/Tests/Unit/Device/CMakeLists.txt new file mode 100644 index 00000000000..940658efdae --- /dev/null +++ b/Tests/Unit/Device/CMakeLists.txt @@ -0,0 +1,10 @@ +include(GoogleTest) # provides gtest_discover_tests + +set(test UnitTestDevice) + +file(GLOB source_files "*.cpp" ${CMAKE_SOURCE_DIR}/Tests/GTestWrapper/TestAll.cpp) + +add_executable(${test} ${source_files}) +target_link_libraries(${test} ${BornAgainDevice_LIBRARY} gtest) + +gtest_discover_tests(${test} DISCOVERY_TIMEOUT 300 TEST_PREFIX Device.Unit.) diff --git a/Tests/Unit/Core/ConstKBinAxisTest.cpp b/Tests/Unit/Device/ConstKBinAxisTest.cpp similarity index 100% rename from Tests/Unit/Core/ConstKBinAxisTest.cpp rename to Tests/Unit/Device/ConstKBinAxisTest.cpp diff --git a/Tests/Unit/Core/CumulativeValueTest.cpp b/Tests/Unit/Device/CumulativeValueTest.cpp similarity index 100% rename from Tests/Unit/Core/CumulativeValueTest.cpp rename to Tests/Unit/Device/CumulativeValueTest.cpp diff --git a/Tests/Unit/Core/CustomBinAxisTest.cpp b/Tests/Unit/Device/CustomBinAxisTest.cpp similarity index 100% rename from Tests/Unit/Core/CustomBinAxisTest.cpp rename to Tests/Unit/Device/CustomBinAxisTest.cpp diff --git a/Tests/Unit/Core/DepthProbeConverterTest.cpp b/Tests/Unit/Device/DepthProbeConverterTest.cpp similarity index 100% rename from Tests/Unit/Core/DepthProbeConverterTest.cpp rename to Tests/Unit/Device/DepthProbeConverterTest.cpp diff --git a/Tests/Unit/Core/DetectorMaskTest.cpp b/Tests/Unit/Device/DetectorMaskTest.cpp similarity index 100% rename from Tests/Unit/Core/DetectorMaskTest.cpp rename to Tests/Unit/Device/DetectorMaskTest.cpp diff --git a/Tests/Unit/Core/FixedBinAxisTest.cpp b/Tests/Unit/Device/FixedBinAxisTest.cpp similarity index 100% rename from Tests/Unit/Core/FixedBinAxisTest.cpp rename to Tests/Unit/Device/FixedBinAxisTest.cpp diff --git a/Tests/Unit/Core/Histogram1DTest.cpp b/Tests/Unit/Device/Histogram1DTest.cpp similarity index 100% rename from Tests/Unit/Core/Histogram1DTest.cpp rename to Tests/Unit/Device/Histogram1DTest.cpp diff --git a/Tests/Unit/Core/Histogram2DTest.cpp b/Tests/Unit/Device/Histogram2DTest.cpp similarity index 100% rename from Tests/Unit/Core/Histogram2DTest.cpp rename to Tests/Unit/Device/Histogram2DTest.cpp diff --git a/Tests/Unit/Core/IOReaderWriterTest.cpp b/Tests/Unit/Device/IOReaderWriterTest.cpp similarity index 100% rename from Tests/Unit/Core/IOReaderWriterTest.cpp rename to Tests/Unit/Device/IOReaderWriterTest.cpp diff --git a/Tests/Unit/Core/IntensityDataFunctionsTest.cpp b/Tests/Unit/Device/IntensityDataFunctionsTest.cpp similarity index 100% rename from Tests/Unit/Core/IntensityDataFunctionsTest.cpp rename to Tests/Unit/Device/IntensityDataFunctionsTest.cpp diff --git a/Tests/Unit/Core/LLDataTest.cpp b/Tests/Unit/Device/LLDataTest.cpp similarity index 100% rename from Tests/Unit/Core/LLDataTest.cpp rename to Tests/Unit/Device/LLDataTest.cpp diff --git a/Tests/Unit/Core/OffSpecularConverterTest.cpp b/Tests/Unit/Device/OffSpecularConverterTest.cpp similarity index 100% rename from Tests/Unit/Core/OffSpecularConverterTest.cpp rename to Tests/Unit/Device/OffSpecularConverterTest.cpp diff --git a/Tests/Unit/Core/OutputDataIteratorTest.cpp b/Tests/Unit/Device/OutputDataIteratorTest.cpp similarity index 100% rename from Tests/Unit/Core/OutputDataIteratorTest.cpp rename to Tests/Unit/Device/OutputDataIteratorTest.cpp diff --git a/Tests/Unit/Core/OutputDataTest.cpp b/Tests/Unit/Device/OutputDataTest.cpp similarity index 100% rename from Tests/Unit/Core/OutputDataTest.cpp rename to Tests/Unit/Device/OutputDataTest.cpp diff --git a/Tests/Unit/Core/PointwiseAxisTest.cpp b/Tests/Unit/Device/PointwiseAxisTest.cpp similarity index 100% rename from Tests/Unit/Core/PointwiseAxisTest.cpp rename to Tests/Unit/Device/PointwiseAxisTest.cpp diff --git a/Tests/Unit/Core/PolygonTest.cpp b/Tests/Unit/Device/PolygonTest.cpp similarity index 100% rename from Tests/Unit/Core/PolygonTest.cpp rename to Tests/Unit/Device/PolygonTest.cpp diff --git a/Tests/Unit/Core/RectangularConverterTest.cpp b/Tests/Unit/Device/RectangularConverterTest.cpp similarity index 100% rename from Tests/Unit/Core/RectangularConverterTest.cpp rename to Tests/Unit/Device/RectangularConverterTest.cpp diff --git a/Tests/Unit/Core/RegionOfInterestTest.cpp b/Tests/Unit/Device/RegionOfInterestTest.cpp similarity index 100% rename from Tests/Unit/Core/RegionOfInterestTest.cpp rename to Tests/Unit/Device/RegionOfInterestTest.cpp diff --git a/Tests/Unit/Core/ScanResolutionTest.cpp b/Tests/Unit/Device/ScanResolutionTest.cpp similarity index 100% rename from Tests/Unit/Core/ScanResolutionTest.cpp rename to Tests/Unit/Device/ScanResolutionTest.cpp diff --git a/Tests/Unit/Core/Shape2DTest.cpp b/Tests/Unit/Device/Shape2DTest.cpp similarity index 100% rename from Tests/Unit/Core/Shape2DTest.cpp rename to Tests/Unit/Device/Shape2DTest.cpp diff --git a/Tests/Unit/Core/SimulationAreaTest.cpp b/Tests/Unit/Device/SimulationAreaTest.cpp similarity index 100% rename from Tests/Unit/Core/SimulationAreaTest.cpp rename to Tests/Unit/Device/SimulationAreaTest.cpp diff --git a/Tests/Unit/Core/SpectrumTest.cpp b/Tests/Unit/Device/SpectrumTest.cpp similarity index 100% rename from Tests/Unit/Core/SpectrumTest.cpp rename to Tests/Unit/Device/SpectrumTest.cpp diff --git a/Tests/Unit/Core/SpecularDetector1DTest.cpp b/Tests/Unit/Device/SpecularDetector1DTest.cpp similarity index 100% rename from Tests/Unit/Core/SpecularDetector1DTest.cpp rename to Tests/Unit/Device/SpecularDetector1DTest.cpp diff --git a/Tests/Unit/Core/SphericalConverterTest.cpp b/Tests/Unit/Device/SphericalConverterTest.cpp similarity index 100% rename from Tests/Unit/Core/SphericalConverterTest.cpp rename to Tests/Unit/Device/SphericalConverterTest.cpp diff --git a/Tests/Unit/Core/SphericalDetectorTest.cpp b/Tests/Unit/Device/SphericalDetectorTest.cpp similarity index 100% rename from Tests/Unit/Core/SphericalDetectorTest.cpp rename to Tests/Unit/Device/SphericalDetectorTest.cpp diff --git a/Tests/Unit/Core/VariableBinAxisTest.cpp b/Tests/Unit/Device/VariableBinAxisTest.cpp similarity index 100% rename from Tests/Unit/Core/VariableBinAxisTest.cpp rename to Tests/Unit/Device/VariableBinAxisTest.cpp diff --git a/Tests/Unit/Core/FittingTestHelper.h b/Tests/Unit/FittingTestHelper.h similarity index 100% rename from Tests/Unit/Core/FittingTestHelper.h rename to Tests/Unit/FittingTestHelper.h diff --git a/Tests/Unit/Param/CMakeLists.txt b/Tests/Unit/Param/CMakeLists.txt new file mode 100644 index 00000000000..7f5af30211c --- /dev/null +++ b/Tests/Unit/Param/CMakeLists.txt @@ -0,0 +1,10 @@ +include(GoogleTest) # provides gtest_discover_tests + +set(test UnitTestParam) + +file(GLOB source_files "*.cpp" ${CMAKE_SOURCE_DIR}/Tests/GTestWrapper/TestAll.cpp) + +add_executable(${test} ${source_files}) +target_link_libraries(${test} ${BornAgainParam_LIBRARY} gtest) + +gtest_discover_tests(${test} DISCOVERY_TIMEOUT 300 TEST_PREFIX Param.Unit.) diff --git a/Tests/Unit/Core/DistributionHandlerTest.cpp b/Tests/Unit/Param/DistributionHandlerTest.cpp similarity index 100% rename from Tests/Unit/Core/DistributionHandlerTest.cpp rename to Tests/Unit/Param/DistributionHandlerTest.cpp diff --git a/Tests/Unit/Core/DistributionsTest.cpp b/Tests/Unit/Param/DistributionsTest.cpp similarity index 100% rename from Tests/Unit/Core/DistributionsTest.cpp rename to Tests/Unit/Param/DistributionsTest.cpp diff --git a/Tests/Unit/Core/INodeTest.cpp b/Tests/Unit/Param/INodeTest.cpp similarity index 100% rename from Tests/Unit/Core/INodeTest.cpp rename to Tests/Unit/Param/INodeTest.cpp diff --git a/Tests/Unit/Core/IParameterizedTest.cpp b/Tests/Unit/Param/IParameterizedTest.cpp similarity index 100% rename from Tests/Unit/Core/IParameterizedTest.cpp rename to Tests/Unit/Param/IParameterizedTest.cpp diff --git a/Tests/Unit/Core/ParameterDistributionTest.cpp b/Tests/Unit/Param/ParameterDistributionTest.cpp similarity index 100% rename from Tests/Unit/Core/ParameterDistributionTest.cpp rename to Tests/Unit/Param/ParameterDistributionTest.cpp diff --git a/Tests/Unit/Core/PolarizationHandlerTest.cpp b/Tests/Unit/Param/PolarizationHandlerTest.cpp similarity index 100% rename from Tests/Unit/Core/PolarizationHandlerTest.cpp rename to Tests/Unit/Param/PolarizationHandlerTest.cpp diff --git a/Tests/Unit/Core/PrecomputedTest.cpp b/Tests/Unit/Param/PrecomputedTest.cpp similarity index 100% rename from Tests/Unit/Core/PrecomputedTest.cpp rename to Tests/Unit/Param/PrecomputedTest.cpp diff --git a/Tests/Unit/Core/RangedDistributionTest.cpp b/Tests/Unit/Param/RangedDistributionTest.cpp similarity index 100% rename from Tests/Unit/Core/RangedDistributionTest.cpp rename to Tests/Unit/Param/RangedDistributionTest.cpp diff --git a/Tests/Unit/Resample/CMakeLists.txt b/Tests/Unit/Resample/CMakeLists.txt new file mode 100644 index 00000000000..3ee2b450ef4 --- /dev/null +++ b/Tests/Unit/Resample/CMakeLists.txt @@ -0,0 +1,10 @@ +include(GoogleTest) # provides gtest_discover_tests + +set(test UnitTestResample) + +file(GLOB source_files "*.cpp" ${CMAKE_SOURCE_DIR}/Tests/GTestWrapper/TestAll.cpp) + +add_executable(${test} ${source_files}) +target_link_libraries(${test} ${BornAgainResample_LIBRARY} gtest) + +gtest_discover_tests(${test} DISCOVERY_TIMEOUT 300 TEST_PREFIX Resample.Unit.) diff --git a/Tests/Unit/Core/FormFactorCoherentSumTest.cpp b/Tests/Unit/Resample/FormFactorCoherentSumTest.cpp similarity index 100% rename from Tests/Unit/Core/FormFactorCoherentSumTest.cpp rename to Tests/Unit/Resample/FormFactorCoherentSumTest.cpp diff --git a/Tests/Unit/Core/KzComputationTest.cpp b/Tests/Unit/Resample/KzComputationTest.cpp similarity index 100% rename from Tests/Unit/Core/KzComputationTest.cpp rename to Tests/Unit/Resample/KzComputationTest.cpp diff --git a/Tests/Unit/Core/LayerFillLimitsTest.cpp b/Tests/Unit/Resample/LayerFillLimitsTest.cpp similarity index 100% rename from Tests/Unit/Core/LayerFillLimitsTest.cpp rename to Tests/Unit/Resample/LayerFillLimitsTest.cpp diff --git a/Tests/Unit/Core/MaterialTest.cpp b/Tests/Unit/Resample/MaterialTest.cpp similarity index 100% rename from Tests/Unit/Core/MaterialTest.cpp rename to Tests/Unit/Resample/MaterialTest.cpp diff --git a/Tests/Unit/Core/MatrixRTCoefficientsTest.cpp b/Tests/Unit/Resample/MatrixRTCoefficientsTest.cpp similarity index 100% rename from Tests/Unit/Core/MatrixRTCoefficientsTest.cpp rename to Tests/Unit/Resample/MatrixRTCoefficientsTest.cpp diff --git a/Tests/Unit/Core/MultilayerAveragingTest.cpp b/Tests/Unit/Resample/MultilayerAveragingTest.cpp similarity index 100% rename from Tests/Unit/Core/MultilayerAveragingTest.cpp rename to Tests/Unit/Resample/MultilayerAveragingTest.cpp diff --git a/Tests/Unit/Core/RTTest.cpp b/Tests/Unit/Resample/RTTest.cpp similarity index 100% rename from Tests/Unit/Core/RTTest.cpp rename to Tests/Unit/Resample/RTTest.cpp diff --git a/Tests/Unit/Core/SimulationElementTest.cpp b/Tests/Unit/Resample/SimulationElementTest.cpp similarity index 100% rename from Tests/Unit/Core/SimulationElementTest.cpp rename to Tests/Unit/Resample/SimulationElementTest.cpp diff --git a/Tests/Unit/Core/SpecularMagneticTest.cpp b/Tests/Unit/Resample/SpecularMagneticTest.cpp similarity index 100% rename from Tests/Unit/Core/SpecularMagneticTest.cpp rename to Tests/Unit/Resample/SpecularMagneticTest.cpp diff --git a/Tests/Unit/Sample/CMakeLists.txt b/Tests/Unit/Sample/CMakeLists.txt new file mode 100644 index 00000000000..908e9f2ffe6 --- /dev/null +++ b/Tests/Unit/Sample/CMakeLists.txt @@ -0,0 +1,10 @@ +include(GoogleTest) # provides gtest_discover_tests + +set(test UnitTestSample) + +file(GLOB source_files "*.cpp" ${CMAKE_SOURCE_DIR}/Tests/GTestWrapper/TestAll.cpp) + +add_executable(${test} ${source_files}) +target_link_libraries(${test} ${BornAgainSample_LIBRARY} gtest) + +gtest_discover_tests(${test} DISCOVERY_TIMEOUT 300 TEST_PREFIX Sample.Unit.) diff --git a/Tests/Unit/Core/CrystalTest.cpp b/Tests/Unit/Sample/CrystalTest.cpp similarity index 100% rename from Tests/Unit/Core/CrystalTest.cpp rename to Tests/Unit/Sample/CrystalTest.cpp diff --git a/Tests/Unit/Core/FTDistributionsTest.cpp b/Tests/Unit/Sample/FTDistributionsTest.cpp similarity index 100% rename from Tests/Unit/Core/FTDistributionsTest.cpp rename to Tests/Unit/Sample/FTDistributionsTest.cpp diff --git a/Tests/Unit/Core/FormFactorBasicTest.cpp b/Tests/Unit/Sample/FormFactorBasicTest.cpp similarity index 100% rename from Tests/Unit/Core/FormFactorBasicTest.cpp rename to Tests/Unit/Sample/FormFactorBasicTest.cpp diff --git a/Tests/Unit/Core/Lattice2DTest.cpp b/Tests/Unit/Sample/Lattice2DTest.cpp similarity index 100% rename from Tests/Unit/Core/Lattice2DTest.cpp rename to Tests/Unit/Sample/Lattice2DTest.cpp diff --git a/Tests/Unit/Core/LatticeTest.cpp b/Tests/Unit/Sample/LatticeTest.cpp similarity index 100% rename from Tests/Unit/Core/LatticeTest.cpp rename to Tests/Unit/Sample/LatticeTest.cpp diff --git a/Tests/Unit/Core/LayerInterfaceTest.cpp b/Tests/Unit/Sample/LayerInterfaceTest.cpp similarity index 100% rename from Tests/Unit/Core/LayerInterfaceTest.cpp rename to Tests/Unit/Sample/LayerInterfaceTest.cpp diff --git a/Tests/Unit/Core/LayerRoughnessTest.cpp b/Tests/Unit/Sample/LayerRoughnessTest.cpp similarity index 100% rename from Tests/Unit/Core/LayerRoughnessTest.cpp rename to Tests/Unit/Sample/LayerRoughnessTest.cpp diff --git a/Tests/Unit/Core/LayerTest.cpp b/Tests/Unit/Sample/LayerTest.cpp similarity index 100% rename from Tests/Unit/Core/LayerTest.cpp rename to Tests/Unit/Sample/LayerTest.cpp diff --git a/Tests/Unit/Core/MesoCrystalTest.cpp b/Tests/Unit/Sample/MesoCrystalTest.cpp similarity index 100% rename from Tests/Unit/Core/MesoCrystalTest.cpp rename to Tests/Unit/Sample/MesoCrystalTest.cpp diff --git a/Tests/Unit/Core/MultiLayerTest.cpp b/Tests/Unit/Sample/MultiLayerTest.cpp similarity index 100% rename from Tests/Unit/Core/MultiLayerTest.cpp rename to Tests/Unit/Sample/MultiLayerTest.cpp diff --git a/Tests/Unit/Core/ParticleCompositionTest.cpp b/Tests/Unit/Sample/ParticleCompositionTest.cpp similarity index 100% rename from Tests/Unit/Core/ParticleCompositionTest.cpp rename to Tests/Unit/Sample/ParticleCompositionTest.cpp diff --git a/Tests/Unit/Core/ParticleCoreShellTest.cpp b/Tests/Unit/Sample/ParticleCoreShellTest.cpp similarity index 100% rename from Tests/Unit/Core/ParticleCoreShellTest.cpp rename to Tests/Unit/Sample/ParticleCoreShellTest.cpp diff --git a/Tests/Unit/Core/ParticleTest.cpp b/Tests/Unit/Sample/ParticleTest.cpp similarity index 100% rename from Tests/Unit/Core/ParticleTest.cpp rename to Tests/Unit/Sample/ParticleTest.cpp diff --git a/Tests/Unit/Core/RotationTest.cpp b/Tests/Unit/Sample/RotationTest.cpp similarity index 100% rename from Tests/Unit/Core/RotationTest.cpp rename to Tests/Unit/Sample/RotationTest.cpp diff --git a/Tests/Unit/Core/SampleBuilderNodeTest.cpp b/Tests/Unit/Sample/SampleBuilderNodeTest.cpp similarity index 100% rename from Tests/Unit/Core/SampleBuilderNodeTest.cpp rename to Tests/Unit/Sample/SampleBuilderNodeTest.cpp diff --git a/Tests/Unit/Core/ZLimitsTest.cpp b/Tests/Unit/Sample/ZLimitsTest.cpp similarity index 100% rename from Tests/Unit/Core/ZLimitsTest.cpp rename to Tests/Unit/Sample/ZLimitsTest.cpp -- GitLab