diff --git a/Alignment/HIPAlignmentAlgorithm/test/testHIPAnalyzers.cc b/Alignment/HIPAlignmentAlgorithm/test/testHIPAnalyzers.cc index 75692c3569534..972db40567d61 100644 --- a/Alignment/HIPAlignmentAlgorithm/test/testHIPAnalyzers.cc +++ b/Alignment/HIPAlignmentAlgorithm/test/testHIPAnalyzers.cc @@ -5,7 +5,7 @@ #include #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" // Function to run the catch2 tests //___________________________________________________________________________________________ diff --git a/Alignment/OfflineValidation/test/testTrackAnalyzers.cc b/Alignment/OfflineValidation/test/testTrackAnalyzers.cc index fbef6338487b3..12b8ca6d4d55e 100644 --- a/Alignment/OfflineValidation/test/testTrackAnalyzers.cc +++ b/Alignment/OfflineValidation/test/testTrackAnalyzers.cc @@ -6,7 +6,7 @@ #include #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" // Function to run the catch2 tests //___________________________________________________________________________________________ diff --git a/CUDADataFormats/Common/test/test_Product.cc b/CUDADataFormats/Common/test/test_Product.cc index d70ff3e63e903..5790d07bec56d 100644 --- a/CUDADataFormats/Common/test/test_Product.cc +++ b/CUDADataFormats/Common/test/test_Product.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "CUDADataFormats/Common/interface/Product.h" #include "HeterogeneousCore/CUDACore/interface/ScopedContext.h" diff --git a/CUDADataFormats/Common/test/test_main.cc b/CUDADataFormats/Common/test/test_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/CUDADataFormats/Common/test/test_main.cc +++ b/CUDADataFormats/Common/test/test_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/CalibFormats/SiStripObjects/test/test_catch2_SiStripHashedDetId.cc b/CalibFormats/SiStripObjects/test/test_catch2_SiStripHashedDetId.cc index 1b5cae7703782..40a222bf8ed10 100644 --- a/CalibFormats/SiStripObjects/test/test_catch2_SiStripHashedDetId.cc +++ b/CalibFormats/SiStripObjects/test/test_catch2_SiStripHashedDetId.cc @@ -2,7 +2,7 @@ #include "CalibFormats/SiStripObjects/interface/SiStripDetInfo.h" #include "CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h" #include "FWCore/ParameterSet/interface/FileInPath.h" -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/CalibFormats/SiStripObjects/test/test_catch2_main.cc b/CalibFormats/SiStripObjects/test/test_catch2_main.cc index e6d1d565b15c0..c247ea2c0f991 100644 --- a/CalibFormats/SiStripObjects/test/test_catch2_main.cc +++ b/CalibFormats/SiStripObjects/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/CalibTracker/SiPixelESProducers/test/test_catch2_ESSources.cc b/CalibTracker/SiPixelESProducers/test/test_catch2_ESSources.cc index f556d6261bd3f..eea890964f3e8 100644 --- a/CalibTracker/SiPixelESProducers/test/test_catch2_ESSources.cc +++ b/CalibTracker/SiPixelESProducers/test/test_catch2_ESSources.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" // Function to run the catch2 tests //___________________________________________________________________________________________ diff --git a/CommonTools/BaseParticlePropagator/test/makeMuon_catch2.cc b/CommonTools/BaseParticlePropagator/test/makeMuon_catch2.cc index 233da8cec146e..2972aa8680834 100644 --- a/CommonTools/BaseParticlePropagator/test/makeMuon_catch2.cc +++ b/CommonTools/BaseParticlePropagator/test/makeMuon_catch2.cc @@ -2,7 +2,7 @@ #include "CommonTools/BaseParticlePropagator/interface/RawParticle.h" #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" static constexpr const double kMuonMass = 0.10566; diff --git a/CondCore/CondHDF5ESSource/test/test_catch2_convertSyncValue.cc b/CondCore/CondHDF5ESSource/test/test_catch2_convertSyncValue.cc index 72d8d4715e0e5..5b7b1e8f04456 100644 --- a/CondCore/CondHDF5ESSource/test/test_catch2_convertSyncValue.cc +++ b/CondCore/CondHDF5ESSource/test/test_catch2_convertSyncValue.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "CondCore/CondHDF5ESSource/plugins/convertSyncValue.h" using namespace cond::hdf5; diff --git a/CondCore/CondHDF5ESSource/test/test_catch2_findMatchFirst.cc b/CondCore/CondHDF5ESSource/test/test_catch2_findMatchFirst.cc index 51482bf878877..cacee451cb1b7 100644 --- a/CondCore/CondHDF5ESSource/test/test_catch2_findMatchFirst.cc +++ b/CondCore/CondHDF5ESSource/test/test_catch2_findMatchFirst.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "CondCore/CondHDF5ESSource/plugins/IOVSyncValue.h" //can't link to plugin so must include source #include "CondCore/CondHDF5ESSource/plugins/IOVSyncValue.cc" diff --git a/CondCore/CondHDF5ESSource/test/test_catch2_h5cpp.cc b/CondCore/CondHDF5ESSource/test/test_catch2_h5cpp.cc index 1f32e6fa2a3f4..451c4fc3bf1de 100644 --- a/CondCore/CondHDF5ESSource/test/test_catch2_h5cpp.cc +++ b/CondCore/CondHDF5ESSource/test/test_catch2_h5cpp.cc @@ -12,7 +12,7 @@ // system include files #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" // user include files #include "FWCore/Utilities/interface/FileInPath.h" diff --git a/CondCore/CondHDF5ESSource/test/test_catch2_main.cc b/CondCore/CondHDF5ESSource/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/CondCore/CondHDF5ESSource/test/test_catch2_main.cc +++ b/CondCore/CondHDF5ESSource/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/CondFormats/EcalObjects/test/EcalPulseSymmCovariance_catch2.cc b/CondFormats/EcalObjects/test/EcalPulseSymmCovariance_catch2.cc index d96f27416cd00..8ea040667c306 100644 --- a/CondFormats/EcalObjects/test/EcalPulseSymmCovariance_catch2.cc +++ b/CondFormats/EcalObjects/test/EcalPulseSymmCovariance_catch2.cc @@ -1,7 +1,7 @@ #include "CondFormats/EcalObjects/interface/EcalPulseSymmCovariances.h" #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include TEST_CASE("EcalPulseSymmCovariance testing", "[EcalPulseSymmCovariance]") { diff --git a/CondFormats/SerializationHelper/test/test_catch2_SerializationHelper.cc b/CondFormats/SerializationHelper/test/test_catch2_SerializationHelper.cc index 2d6b2477b7031..a29446a98aa14 100644 --- a/CondFormats/SerializationHelper/test/test_catch2_SerializationHelper.cc +++ b/CondFormats/SerializationHelper/test/test_catch2_SerializationHelper.cc @@ -11,7 +11,7 @@ // // system include files -#include "catch.hpp" +#include "catch2/catch_all.hpp" // user include files #include "CondFormats/SerializationHelper/interface/SerializationHelper.h" diff --git a/CondFormats/SerializationHelper/test/test_catch2_main.cc b/CondFormats/SerializationHelper/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/CondFormats/SerializationHelper/test/test_catch2_main.cc +++ b/CondFormats/SerializationHelper/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/CondFormats/SerializationHelper/test/test_catch2_unique_void_ptr.cc b/CondFormats/SerializationHelper/test/test_catch2_unique_void_ptr.cc index 4ef138e5cb919..6d3840712758e 100644 --- a/CondFormats/SerializationHelper/test/test_catch2_unique_void_ptr.cc +++ b/CondFormats/SerializationHelper/test/test_catch2_unique_void_ptr.cc @@ -10,7 +10,7 @@ // Created: Wed, 31 May 2023 15:24:23 GMT // -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "CondFormats/SerializationHelper/interface/unique_void_ptr.h" using namespace cond::serialization; diff --git a/CondFormats/SiStripObjects/test/test_catch2_SiStripBadStripForPhase2.cpp b/CondFormats/SiStripObjects/test/test_catch2_SiStripBadStripForPhase2.cpp index 407dfe23cb747..00f11a5e3c406 100644 --- a/CondFormats/SiStripObjects/test/test_catch2_SiStripBadStripForPhase2.cpp +++ b/CondFormats/SiStripObjects/test/test_catch2_SiStripBadStripForPhase2.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include // std::setw #include "CondFormats/SiStripObjects/interface/SiStripBadStrip.h" diff --git a/CondFormats/SiStripObjects/test/test_catch2_SiStripLatency.cpp b/CondFormats/SiStripObjects/test/test_catch2_SiStripLatency.cpp index 00fa7db39fea9..1a50accf60517 100644 --- a/CondFormats/SiStripObjects/test/test_catch2_SiStripLatency.cpp +++ b/CondFormats/SiStripObjects/test/test_catch2_SiStripLatency.cpp @@ -1,5 +1,5 @@ #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include // std::setw diff --git a/CondFormats/SiStripObjects/test/test_catch2_main.cpp b/CondFormats/SiStripObjects/test/test_catch2_main.cpp index e6d1d565b15c0..c247ea2c0f991 100644 --- a/CondFormats/SiStripObjects/test/test_catch2_main.cpp +++ b/CondFormats/SiStripObjects/test/test_catch2_main.cpp @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/CondTools/RunInfo/test/test_catch2_LHCInfoPerFillPopCon.cpp b/CondTools/RunInfo/test/test_catch2_LHCInfoPerFillPopCon.cpp index 554324ad5e79d..97d151e9585fa 100644 --- a/CondTools/RunInfo/test/test_catch2_LHCInfoPerFillPopCon.cpp +++ b/CondTools/RunInfo/test/test_catch2_LHCInfoPerFillPopCon.cpp @@ -1,6 +1,6 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "CondTools/RunInfo/interface/LHCInfoPerFillPopConSourceHandler.h" #include "CondTools/RunInfo/interface/TestLHCInfoPerFillPopConSourceHandler.h" @@ -336,7 +336,7 @@ TEST_CASE("LHCInfoPerFillPopConSourceHandler.getNewObjects fills IOVs correctly // Populate mock data std::vector fillNumbers = {1000}; - std::vector energies = {GENERATE(450.0, 6600.0, 8000.0)}; + std::vector energies = {GENERATE(450.0f, 6600.0f, 8000.0f)}; std::vector fillStartTimes = {boost::posix_time::time_from_string("2023-06-01 11:30:00")}; std::vector fillStableBeamBeginTimes = { boost::posix_time::time_from_string("2023-06-01 12:00:00")}; @@ -436,7 +436,7 @@ TEST_CASE( // Populate mock data std::vector fillNumbers = {1000}; - std::vector energies = {GENERATE(-6800., -1., 0., 449.9, 8000.1)}; // invalid energy + std::vector energies = {GENERATE(-6800.f, -1.f, 0.f, 449.9f, 8000.1f)}; // invalid energy std::vector fillStartTimes = {boost::posix_time::time_from_string("2023-06-01 11:30:00")}; std::vector fillStableBeamBeginTimes = { boost::posix_time::time_from_string("2023-06-01 12:00:00")}; diff --git a/DQM/BeamMonitor/test/testAlcaBeamMonitor.cc b/DQM/BeamMonitor/test/testAlcaBeamMonitor.cc index 13ddd8d979295..2e0254b91cd22 100644 --- a/DQM/BeamMonitor/test/testAlcaBeamMonitor.cc +++ b/DQM/BeamMonitor/test/testAlcaBeamMonitor.cc @@ -1,7 +1,7 @@ #include "FWCore/TestProcessor/interface/TestProcessor.h" #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" TEST_CASE("AlcaBeamMonitor tests", "[AlcaBeamMonitor]") { //The python configuration diff --git a/DQM/EcalCommon/test/testEcalCommon.cc b/DQM/EcalCommon/test/testEcalCommon.cc index 73e566c869f47..9da1647a03ee3 100644 --- a/DQM/EcalCommon/test/testEcalCommon.cc +++ b/DQM/EcalCommon/test/testEcalCommon.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" // Function to run the catch2 tests //___________________________________________________________________________________________ diff --git a/DQM/TrackerRemapper/test/test_catch2_Phase1PixelMaps.cc b/DQM/TrackerRemapper/test/test_catch2_Phase1PixelMaps.cc index b5d0fa6f0cc7d..d8671946d965f 100644 --- a/DQM/TrackerRemapper/test/test_catch2_Phase1PixelMaps.cc +++ b/DQM/TrackerRemapper/test/test_catch2_Phase1PixelMaps.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include // std::accumulate #include "TCanvas.h" diff --git a/DQM/TrackerRemapper/test/test_catch2_Phase1PixelROCMaps.cc b/DQM/TrackerRemapper/test/test_catch2_Phase1PixelROCMaps.cc index faacee06624d7..9d4f34b0d858d 100644 --- a/DQM/TrackerRemapper/test/test_catch2_Phase1PixelROCMaps.cc +++ b/DQM/TrackerRemapper/test/test_catch2_Phase1PixelROCMaps.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include // std::accumulate #include "TCanvas.h" diff --git a/DQM/TrackerRemapper/test/test_catch2_Phase1PixelSummaryMap.cc b/DQM/TrackerRemapper/test/test_catch2_Phase1PixelSummaryMap.cc index 2703bec14df3d..5fd75585a364d 100644 --- a/DQM/TrackerRemapper/test/test_catch2_Phase1PixelSummaryMap.cc +++ b/DQM/TrackerRemapper/test/test_catch2_Phase1PixelSummaryMap.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include // std::accumulate #include "TCanvas.h" diff --git a/DQM/TrackerRemapper/test/test_catch2_SiStripTkMaps.cc b/DQM/TrackerRemapper/test/test_catch2_SiStripTkMaps.cc index 5b63b45e1b974..5d76c99fd8904 100644 --- a/DQM/TrackerRemapper/test/test_catch2_SiStripTkMaps.cc +++ b/DQM/TrackerRemapper/test/test_catch2_SiStripTkMaps.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include // std::accumulate #include "TCanvas.h" diff --git a/DQM/TrackerRemapper/test/test_catch2_main.cc b/DQM/TrackerRemapper/test/test_catch2_main.cc index e6d1d565b15c0..c247ea2c0f991 100644 --- a/DQM/TrackerRemapper/test/test_catch2_main.cc +++ b/DQM/TrackerRemapper/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/DQM/TrackingMonitorSource/test/testTrackingDQMAnalyzers.cc b/DQM/TrackingMonitorSource/test/testTrackingDQMAnalyzers.cc index 7404a06c480ae..ae1844ba34f36 100644 --- a/DQM/TrackingMonitorSource/test/testTrackingDQMAnalyzers.cc +++ b/DQM/TrackingMonitorSource/test/testTrackingDQMAnalyzers.cc @@ -5,7 +5,7 @@ #include #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" // Function to run the catch2 tests //___________________________________________________________________________________________ diff --git a/DQMOffline/Trigger/test/EgHLTComCodes_catch2_test.cpp b/DQMOffline/Trigger/test/EgHLTComCodes_catch2_test.cpp index 9adb4b704eb2f..5aaf9c1b62cad 100644 --- a/DQMOffline/Trigger/test/EgHLTComCodes_catch2_test.cpp +++ b/DQMOffline/Trigger/test/EgHLTComCodes_catch2_test.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DQMOffline/Trigger/interface/EgHLTComCodes.h" #include "DQMOffline/Trigger/interface/EgHLTEgCutCodes.h" diff --git a/DQMOffline/Trigger/test/EgHLTTrigCodes_catch2_test.cpp b/DQMOffline/Trigger/test/EgHLTTrigCodes_catch2_test.cpp index 723cd3bdc0597..5ec41a0091f9f 100644 --- a/DQMOffline/Trigger/test/EgHLTTrigCodes_catch2_test.cpp +++ b/DQMOffline/Trigger/test/EgHLTTrigCodes_catch2_test.cpp @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DQMOffline/Trigger/interface/EgHLTTrigCodes.h" diff --git a/DataFormats/Common/test/test_catch2_BoostRange.cpp b/DataFormats/Common/test/test_catch2_BoostRange.cpp index 8deaf24b937c1..5fc0c75e48d98 100644 --- a/DataFormats/Common/test/test_catch2_BoostRange.cpp +++ b/DataFormats/Common/test/test_catch2_BoostRange.cpp @@ -9,7 +9,7 @@ #include #include #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" struct Dummy { Dummy() : id() {} diff --git a/DataFormats/Common/test/test_catch2_DataFrame.cpp b/DataFormats/Common/test/test_catch2_DataFrame.cpp index c631d0fe28755..53049f7ea7fbd 100644 --- a/DataFormats/Common/test/test_catch2_DataFrame.cpp +++ b/DataFormats/Common/test/test_catch2_DataFrame.cpp @@ -4,7 +4,7 @@ #include #include #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/DataFrame.h" #include "DataFormats/Common/interface/DataFrameContainer.h" diff --git a/DataFormats/Common/test/test_catch2_DetSetNew.cpp b/DataFormats/Common/test/test_catch2_DetSetNew.cpp index 0ad80b6be985f..77da3fbd6ffe5 100644 --- a/DataFormats/Common/test/test_catch2_DetSetNew.cpp +++ b/DataFormats/Common/test/test_catch2_DetSetNew.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/DetSetNew.h" #include "DataFormats/Common/interface/DetSetVectorNew.h" @@ -207,7 +207,7 @@ TEST_CASE("DetSetNew", "[DetSetNew]") { // test error conditions REQUIRE_THROWS_MATCHES( - detsets.insert(22, 6), edm::Exception, Catch::Predicate([](edm::Exception const &e) { + detsets.insert(22, 6), edm::Exception, Catch::Matchers::Predicate([](edm::Exception const &e) { return e.categoryCode() == edm::errors::InvalidReference; })); } @@ -307,7 +307,7 @@ TEST_CASE("DetSetNew", "[DetSetNew]") { // test error conditions REQUIRE_THROWS_MATCHES( - FF(detsets, 22), edm::Exception, Catch::Predicate([](edm::Exception const &e) { + FF(detsets, 22), edm::Exception, Catch::Matchers::Predicate([](edm::Exception const &e) { return e.categoryCode() == edm::errors::InvalidReference; })); REQUIRE_THROWS_MATCHES( @@ -316,7 +316,7 @@ TEST_CASE("DetSetNew", "[DetSetNew]") { FF ff2(d, 45); }(detsets), edm::Exception, - Catch::Predicate( + Catch::Matchers::Predicate( [](edm::Exception const &e) { return e.categoryCode() == edm::errors::LogicError; })); } @@ -378,7 +378,7 @@ TEST_CASE("DetSetNew", "[DetSetNew]") { } SECTION("error conditions") { REQUIRE_THROWS_MATCHES( - TSFF(detsets, 22), edm::Exception, Catch::Predicate([](edm::Exception const &e) { + TSFF(detsets, 22), edm::Exception, Catch::Matchers::Predicate([](edm::Exception const &e) { return e.categoryCode() == edm::errors::InvalidReference; })); REQUIRE_THROWS_MATCHES( @@ -387,7 +387,7 @@ TEST_CASE("DetSetNew", "[DetSetNew]") { TSFF ff2(d, 45); }(detsets), edm::Exception, - Catch::Predicate( + Catch::Matchers::Predicate( [](edm::Exception const &e) { return e.categoryCode() == edm::errors::LogicError; })); } } @@ -439,9 +439,10 @@ TEST_CASE("DetSetNew", "[DetSetNew]") { REQUIRE(p == detsets.end()); } SECTION("invalid index") { - REQUIRE_THROWS_MATCHES(detsets[44], edm::Exception, Catch::Predicate([](edm::Exception const &e) { - return e.categoryCode() == edm::errors::InvalidReference; - })); + REQUIRE_THROWS_MATCHES( + detsets[44], edm::Exception, Catch::Matchers::Predicate([](edm::Exception const &e) { + return e.categoryCode() == edm::errors::InvalidReference; + })); } } @@ -535,9 +536,10 @@ TEST_CASE("DetSetNew", "[DetSetNew]") { } SECTION("invalid index") { - REQUIRE_THROWS_MATCHES(detsets[22], edm::Exception, Catch::Predicate([](edm::Exception const &e) { - return e.categoryCode() == edm::errors::InvalidReference; - })); + REQUIRE_THROWS_MATCHES( + detsets[22], edm::Exception, Catch::Matchers::Predicate([](edm::Exception const &e) { + return e.categoryCode() == edm::errors::InvalidReference; + })); } DSTV detsets2; detsets2.swap(detsets); diff --git a/DataFormats/Common/test/test_catch2_DetSetNewTS.cpp b/DataFormats/Common/test/test_catch2_DetSetNewTS.cpp index 38d66430b5f77..822234896d20d 100644 --- a/DataFormats/Common/test/test_catch2_DetSetNewTS.cpp +++ b/DataFormats/Common/test/test_catch2_DetSetNewTS.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/DetSetNew.h" #include "DataFormats/Common/interface/DetSetVectorNew.h" diff --git a/DataFormats/Common/test/test_catch2_DetSetVector.cpp b/DataFormats/Common/test/test_catch2_DetSetVector.cpp index 29e56b10c9f2c..65ae4dcbb063b 100644 --- a/DataFormats/Common/test/test_catch2_DetSetVector.cpp +++ b/DataFormats/Common/test/test_catch2_DetSetVector.cpp @@ -2,7 +2,7 @@ * CMSSW */ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/DetSetVector.h" #include "DataFormats/Common/interface/Ref.h" diff --git a/DataFormats/Common/test/test_catch2_DetSetVectorWithKey_t.cpp b/DataFormats/Common/test/test_catch2_DetSetVectorWithKey_t.cpp index c7d9c6f87d644..9f42297d3227a 100644 --- a/DataFormats/Common/test/test_catch2_DetSetVectorWithKey_t.cpp +++ b/DataFormats/Common/test/test_catch2_DetSetVectorWithKey_t.cpp @@ -5,7 +5,7 @@ #include #include -#include +#include #include "DataFormats/Common/interface/DetSetVector.h" #include "DataFormats/Common/interface/Ref.h" diff --git a/DataFormats/Common/test/test_catch2_DictionaryTools.cpp b/DataFormats/Common/test/test_catch2_DictionaryTools.cpp index fe059715c4500..126a7db3ba724 100644 --- a/DataFormats/Common/test/test_catch2_DictionaryTools.cpp +++ b/DataFormats/Common/test/test_catch2_DictionaryTools.cpp @@ -4,7 +4,7 @@ #include "FWCore/Utilities/interface/TypeDemangler.h" #include "FWCore/Utilities/interface/TypeID.h" #include "FWCore/Reflection/interface/TypeWithDict.h" -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include #include diff --git a/DataFormats/Common/test/test_catch2_MapOfVectors.cpp b/DataFormats/Common/test/test_catch2_MapOfVectors.cpp index ce0cf9165cb6c..dfef799ccc894 100644 --- a/DataFormats/Common/test/test_catch2_MapOfVectors.cpp +++ b/DataFormats/Common/test/test_catch2_MapOfVectors.cpp @@ -1,6 +1,6 @@ #include #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/MapOfVectors.h" typedef edm::MapOfVectors MII; diff --git a/DataFormats/Common/test/test_catch2_MultiSpan.cpp b/DataFormats/Common/test/test_catch2_MultiSpan.cpp index 065de6d90a72d..ffcffa5dfd561 100644 --- a/DataFormats/Common/test/test_catch2_MultiSpan.cpp +++ b/DataFormats/Common/test/test_catch2_MultiSpan.cpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include "DataFormats/Common/interface/MultiSpan.h" diff --git a/DataFormats/Common/test/test_catch2_OwnVector.cpp b/DataFormats/Common/test/test_catch2_OwnVector.cpp index e132c4d76cf39..12df535842d1c 100644 --- a/DataFormats/Common/test/test_catch2_OwnVector.cpp +++ b/DataFormats/Common/test/test_catch2_OwnVector.cpp @@ -1,7 +1,7 @@ #include #include #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/OwnVector.h" #include "FWCore/Utilities/interface/propagate_const.h" diff --git a/DataFormats/Common/test/test_catch2_Ref.cpp b/DataFormats/Common/test/test_catch2_Ref.cpp index b4c2809e52ba8..525430a6ca0c4 100644 --- a/DataFormats/Common/test/test_catch2_Ref.cpp +++ b/DataFormats/Common/test/test_catch2_Ref.cpp @@ -3,7 +3,7 @@ #include "DataFormats/Common/interface/EDProductGetter.h" #include "DataFormats/Common/interface/Ref.h" #include "FWCore/Utilities/interface/EDMException.h" -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/DataFormats/Common/test/test_catch2_RefCore.cpp b/DataFormats/Common/test/test_catch2_RefCore.cpp index 4e232407cc903..f993a7e633568 100644 --- a/DataFormats/Common/test/test_catch2_RefCore.cpp +++ b/DataFormats/Common/test/test_catch2_RefCore.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/RefCore.h" #include "DataFormats/Common/interface/RefCoreWithIndex.h" diff --git a/DataFormats/Common/test/test_catch2_RefToBase.cpp b/DataFormats/Common/test/test_catch2_RefToBase.cpp index a52ea205a5af8..255ca1ac015c3 100644 --- a/DataFormats/Common/test/test_catch2_RefToBase.cpp +++ b/DataFormats/Common/test/test_catch2_RefToBase.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/RefToBase.h" #include "DataFormats/Common/interface/Ref.h" diff --git a/DataFormats/Common/test/test_catch2_RefVector.cpp b/DataFormats/Common/test/test_catch2_RefVector.cpp index a6feb203379b1..2afdc41835b2c 100644 --- a/DataFormats/Common/test/test_catch2_RefVector.cpp +++ b/DataFormats/Common/test/test_catch2_RefVector.cpp @@ -1,5 +1,5 @@ #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/Ref.h" #include "DataFormats/Common/interface/RefVector.h" diff --git a/DataFormats/Common/test/test_catch2_StdArray.cpp b/DataFormats/Common/test/test_catch2_StdArray.cpp index 503dcf5748a86..f3cb4da8a3912 100644 --- a/DataFormats/Common/test/test_catch2_StdArray.cpp +++ b/DataFormats/Common/test/test_catch2_StdArray.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/StdArray.h" diff --git a/DataFormats/Common/test/test_catch2_ThinnedRefSet.cpp b/DataFormats/Common/test/test_catch2_ThinnedRefSet.cpp index f225467136b3b..ac84f3f295d8e 100644 --- a/DataFormats/Common/test/test_catch2_ThinnedRefSet.cpp +++ b/DataFormats/Common/test/test_catch2_ThinnedRefSet.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/DetSetVectorNew.h" #include "DataFormats/Common/interface/ThinnedRefSet.h" diff --git a/DataFormats/Common/test/test_catch2_Trie.cpp b/DataFormats/Common/test/test_catch2_Trie.cpp index 6cdcd963a11b1..89a281cebc826 100644 --- a/DataFormats/Common/test/test_catch2_Trie.cpp +++ b/DataFormats/Common/test/test_catch2_Trie.cpp @@ -19,7 +19,7 @@ ** modified by Vincenzo Innocente on 15/08/2007 */ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include #include diff --git a/DataFormats/Common/test/test_catch2_Wrapper.cpp b/DataFormats/Common/test/test_catch2_Wrapper.cpp index 68411bc0b1a2d..cba593441f415 100644 --- a/DataFormats/Common/test/test_catch2_Wrapper.cpp +++ b/DataFormats/Common/test/test_catch2_Wrapper.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include "DataFormats/Common/interface/Wrapper.h" diff --git a/DataFormats/Common/test/test_catch2_exDSTV.cpp b/DataFormats/Common/test/test_catch2_exDSTV.cpp index 22d95e1378868..84043f82ef359 100644 --- a/DataFormats/Common/test/test_catch2_exDSTV.cpp +++ b/DataFormats/Common/test/test_catch2_exDSTV.cpp @@ -2,7 +2,7 @@ #include "FWCore/Utilities/interface/Exception.h" #include #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" namespace { struct T { diff --git a/DataFormats/Common/test/test_catch2_exTrie.cpp b/DataFormats/Common/test/test_catch2_exTrie.cpp index 3454ebdf8451b..ad0db8ffb06cd 100644 --- a/DataFormats/Common/test/test_catch2_exTrie.cpp +++ b/DataFormats/Common/test/test_catch2_exTrie.cpp @@ -1,6 +1,6 @@ /* */ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/Trie.h" #include "FWCore/Utilities/interface/Exception.h" @@ -131,7 +131,7 @@ TEST_CASE("test Trie", "[Trie]") { label[i] value[8] label[j] value[9] )"; - REQUIRE_THAT(s.str(), Catch::Equals(output)); + REQUIRE_THAT(s.str(), Catch::Matchers::Equals(output)); SECTION("ab display") { pointer pn = trie.node("ab", 2); diff --git a/DataFormats/Common/test/test_catch2_traits.cpp b/DataFormats/Common/test/test_catch2_traits.cpp index cd9a463561e6e..b0e118c405a56 100644 --- a/DataFormats/Common/test/test_catch2_traits.cpp +++ b/DataFormats/Common/test/test_catch2_traits.cpp @@ -2,7 +2,7 @@ #include #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Common/interface/traits.h" TEST_CASE("edm::key_traits", "[traits]") { diff --git a/DataFormats/HGCalReco/test/EtaPhiSearchInTile_t.cpp b/DataFormats/HGCalReco/test/EtaPhiSearchInTile_t.cpp index e7c913af2d86d..3e714c2f1fcde 100644 --- a/DataFormats/HGCalReco/test/EtaPhiSearchInTile_t.cpp +++ b/DataFormats/HGCalReco/test/EtaPhiSearchInTile_t.cpp @@ -5,7 +5,7 @@ #include "DataFormats/HGCalReco/interface/TICLLayerTile.h" #define CATCH_CONFIG_MAIN -#include +#include using namespace ticl; diff --git a/DataFormats/Histograms/test/MonitorElementData_Path_catch.cc b/DataFormats/Histograms/test/MonitorElementData_Path_catch.cc index 2409a087a819d..b3c719bad3483 100644 --- a/DataFormats/Histograms/test/MonitorElementData_Path_catch.cc +++ b/DataFormats/Histograms/test/MonitorElementData_Path_catch.cc @@ -13,7 +13,7 @@ // system include files #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" // user include files #include "DataFormats/Histograms/interface/MonitorElementCollection.h" diff --git a/DataFormats/L1TGlobal/test/test_catch2_l1tGlobalObject.cc b/DataFormats/L1TGlobal/test/test_catch2_l1tGlobalObject.cc index 57c94a6321c1c..cfe6c472576c4 100644 --- a/DataFormats/L1TGlobal/test/test_catch2_l1tGlobalObject.cc +++ b/DataFormats/L1TGlobal/test/test_catch2_l1tGlobalObject.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/DataFormats/ParticleFlowReco/test/test_catch2_PFDisplacedVertexSeed.cc b/DataFormats/ParticleFlowReco/test/test_catch2_PFDisplacedVertexSeed.cc index fa5a907bf7c18..e1d505a4e03b7 100644 --- a/DataFormats/ParticleFlowReco/test/test_catch2_PFDisplacedVertexSeed.cc +++ b/DataFormats/ParticleFlowReco/test/test_catch2_PFDisplacedVertexSeed.cc @@ -1,7 +1,7 @@ #include "DataFormats/TrackReco/interface/Track.h" #include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertexSeed.h" -#include "catch.hpp" +#include "catch2/catch_all.hpp" static constexpr auto s_tag = "[PFDisplacedVertexSeed]"; TEST_CASE("Check adding elements", s_tag) { diff --git a/DataFormats/ParticleFlowReco/test/test_catch2_main.cc b/DataFormats/ParticleFlowReco/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/DataFormats/ParticleFlowReco/test/test_catch2_main.cc +++ b/DataFormats/ParticleFlowReco/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/DataFormats/Portable/test/alpaka/test_catch2_heterogeneousDeepCopy.dev.cc b/DataFormats/Portable/test/alpaka/test_catch2_heterogeneousDeepCopy.dev.cc index 1ecb5ac9ef91d..2fad4cd318d28 100644 --- a/DataFormats/Portable/test/alpaka/test_catch2_heterogeneousDeepCopy.dev.cc +++ b/DataFormats/Portable/test/alpaka/test_catch2_heterogeneousDeepCopy.dev.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "DataFormats/SoATemplate/interface/SoALayout.h" #include "DataFormats/Portable/interface/PortableCollection.h" diff --git a/DataFormats/Portable/test/test_catch2_deepCopyOnHost.cc b/DataFormats/Portable/test/test_catch2_deepCopyOnHost.cc index c39e36963af6b..b2bf4b4413443 100644 --- a/DataFormats/Portable/test/test_catch2_deepCopyOnHost.cc +++ b/DataFormats/Portable/test/test_catch2_deepCopyOnHost.cc @@ -1,7 +1,7 @@ #include #include -#include +#include #include "DataFormats/Portable/interface/PortableHostCollection.h" #include "DataFormats/SoATemplate/interface/SoACommon.h" diff --git a/DataFormats/Portable/test/test_catch2_main.cc b/DataFormats/Portable/test/test_catch2_main.cc index b3143fbb1788b..2c344d5b8aab1 100644 --- a/DataFormats/Portable/test/test_catch2_main.cc +++ b/DataFormats/Portable/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include +#include diff --git a/DataFormats/Portable/test/test_catch2_portableCollectionOnHost.cc b/DataFormats/Portable/test/test_catch2_portableCollectionOnHost.cc index 0d302c805a861..cd504fc266c66 100644 --- a/DataFormats/Portable/test/test_catch2_portableCollectionOnHost.cc +++ b/DataFormats/Portable/test/test_catch2_portableCollectionOnHost.cc @@ -1,4 +1,4 @@ -#include +#include #include "DataFormats/Portable/interface/PortableCollection.h" #include "DataFormats/Portable/interface/PortableHostCollection.h" diff --git a/DataFormats/Portable/test/test_catch2_portableMultiCollectionOnHost.cc b/DataFormats/Portable/test/test_catch2_portableMultiCollectionOnHost.cc index 3850cbdcc9636..88d1cd8e4dfe6 100644 --- a/DataFormats/Portable/test/test_catch2_portableMultiCollectionOnHost.cc +++ b/DataFormats/Portable/test/test_catch2_portableMultiCollectionOnHost.cc @@ -1,4 +1,4 @@ -#include +#include #include "DataFormats/Portable/interface/PortableCollection.h" #include "DataFormats/Portable/interface/PortableHostCollection.h" diff --git a/DataFormats/Portable/test/test_catch2_portableObjectOnHost.cc b/DataFormats/Portable/test/test_catch2_portableObjectOnHost.cc index 4afe56be3e322..a3eceb0d2fe41 100644 --- a/DataFormats/Portable/test/test_catch2_portableObjectOnHost.cc +++ b/DataFormats/Portable/test/test_catch2_portableObjectOnHost.cc @@ -1,4 +1,4 @@ -#include +#include #include "DataFormats/Portable/interface/PortableObject.h" #include "DataFormats/Portable/interface/PortableHostObject.h" diff --git a/DataFormats/Provenance/test/CompactHash_t.cpp b/DataFormats/Provenance/test/CompactHash_t.cpp index 5cef47f2a6a8e..8fcc811012e52 100644 --- a/DataFormats/Provenance/test/CompactHash_t.cpp +++ b/DataFormats/Provenance/test/CompactHash_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Provenance/interface/CompactHash.h" #include "FWCore/Utilities/interface/Digest.h" diff --git a/DataFormats/Provenance/test/ElementID_t.cpp b/DataFormats/Provenance/test/ElementID_t.cpp index 3213e26e70772..ee1c30de19fed 100644 --- a/DataFormats/Provenance/test/ElementID_t.cpp +++ b/DataFormats/Provenance/test/ElementID_t.cpp @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Provenance/interface/ElementID.h" diff --git a/DataFormats/Provenance/test/HardwareResourcesDescription_t.cpp b/DataFormats/Provenance/test/HardwareResourcesDescription_t.cpp index 191b8d7189c1b..30794c3c42cd3 100644 --- a/DataFormats/Provenance/test/HardwareResourcesDescription_t.cpp +++ b/DataFormats/Provenance/test/HardwareResourcesDescription_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Provenance/interface/HardwareResourcesDescription.h" #include "FWCore/Utilities/interface/EDMException.h" diff --git a/DataFormats/Provenance/test/Hash_t.cpp b/DataFormats/Provenance/test/Hash_t.cpp index 128d970b2a7af..121dbf51368ae 100644 --- a/DataFormats/Provenance/test/Hash_t.cpp +++ b/DataFormats/Provenance/test/Hash_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/DataFormats/Provenance/test/Parentage_t.cpp b/DataFormats/Provenance/test/Parentage_t.cpp index e65d3f2c7f1fd..968a88ef6196f 100644 --- a/DataFormats/Provenance/test/Parentage_t.cpp +++ b/DataFormats/Provenance/test/Parentage_t.cpp @@ -4,7 +4,7 @@ #include #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" TEST_CASE("test Parentage", "[Parentage]") { edm::Parentage ed1; diff --git a/DataFormats/Provenance/test/ProductNamePattern_t.cpp b/DataFormats/Provenance/test/ProductNamePattern_t.cpp index 9ae7bbe0204a9..d30e18671016f 100644 --- a/DataFormats/Provenance/test/ProductNamePattern_t.cpp +++ b/DataFormats/Provenance/test/ProductNamePattern_t.cpp @@ -1,7 +1,7 @@ #include #include -#include +#include #include "DataFormats/Provenance/interface/ProductNamePattern.h" #include "DataFormats/Provenance/interface/ProductDescription.h" diff --git a/DataFormats/Provenance/test/StoredProcessBlockHelper_t.cpp b/DataFormats/Provenance/test/StoredProcessBlockHelper_t.cpp index ff596c3d5515e..95c2cd0fdfec2 100644 --- a/DataFormats/Provenance/test/StoredProcessBlockHelper_t.cpp +++ b/DataFormats/Provenance/test/StoredProcessBlockHelper_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Provenance/interface/EventToProcessBlockIndexes.h" #include "DataFormats/Provenance/interface/StoredProcessBlockHelper.h" diff --git a/DataFormats/Provenance/test/processingOrderMerge_t.cpp b/DataFormats/Provenance/test/processingOrderMerge_t.cpp index a0ca7057e1ffc..2b19a397a2811 100644 --- a/DataFormats/Provenance/test/processingOrderMerge_t.cpp +++ b/DataFormats/Provenance/test/processingOrderMerge_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Provenance/interface/ProcessHistory.h" #include "DataFormats/Provenance/interface/processingOrderMerge.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/DataFormats/Provenance/test/productResolverIndexHelper_t.cpp b/DataFormats/Provenance/test/productResolverIndexHelper_t.cpp index 765e0dcd6929c..eca9ccc631625 100644 --- a/DataFormats/Provenance/test/productResolverIndexHelper_t.cpp +++ b/DataFormats/Provenance/test/productResolverIndexHelper_t.cpp @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include +#include #include "DataFormats/Provenance/interface/EventID.h" #include "DataFormats/Provenance/interface/ProductID.h" diff --git a/DataFormats/SoATemplate/test/SoACustomizedMethods_t.cc b/DataFormats/SoATemplate/test/SoACustomizedMethods_t.cc index 471ad0b6d2651..5fadefb67258c 100644 --- a/DataFormats/SoATemplate/test/SoACustomizedMethods_t.cc +++ b/DataFormats/SoATemplate/test/SoACustomizedMethods_t.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include +#include #include "DataFormats/SoATemplate/interface/SoALayout.h" diff --git a/DataFormats/SoATemplate/test/SoAGenericView_t.cc b/DataFormats/SoATemplate/test/SoAGenericView_t.cc index e1ddc48d0e22b..8f6c1d357965a 100644 --- a/DataFormats/SoATemplate/test/SoAGenericView_t.cc +++ b/DataFormats/SoATemplate/test/SoAGenericView_t.cc @@ -2,7 +2,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "DataFormats/SoATemplate/interface/SoALayout.h" diff --git a/DataFormats/SoATemplate/test/SoAUnitTests.cc b/DataFormats/SoATemplate/test/SoAUnitTests.cc index a7f469618dfb2..0c51ae64c0517 100644 --- a/DataFormats/SoATemplate/test/SoAUnitTests.cc +++ b/DataFormats/SoATemplate/test/SoAUnitTests.cc @@ -2,7 +2,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "DataFormats/SoATemplate/interface/SoALayout.h" diff --git a/FWCore/Catalog/test/FileLocator_t.cpp b/FWCore/Catalog/test/FileLocator_t.cpp index 81730a7794094..335bcbc506945 100644 --- a/FWCore/Catalog/test/FileLocator_t.cpp +++ b/FWCore/Catalog/test/FileLocator_t.cpp @@ -9,7 +9,7 @@ #include #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" TEST_CASE("FileLocator with Rucio data catalog", "[FWCore/Catalog]") { edm::ServiceToken tempToken = edmtest::catalog::makeTestSiteLocalConfigToken(); diff --git a/FWCore/Catalog/test/InputFileCatalog_t.cpp b/FWCore/Catalog/test/InputFileCatalog_t.cpp index 571db9956fd44..97a2f335811a6 100644 --- a/FWCore/Catalog/test/InputFileCatalog_t.cpp +++ b/FWCore/Catalog/test/InputFileCatalog_t.cpp @@ -3,7 +3,7 @@ #include "TestSiteLocalConfig.h" -#include "catch.hpp" +#include "catch2/catch_all.hpp" TEST_CASE("InputFileCatalog with Rucio data catalog", "[FWCore/Catalog]") { edm::ServiceToken tempToken = edmtest::catalog::makeTestSiteLocalConfigToken(); diff --git a/FWCore/Common/test/test_catch2_ProcessBlockHelpers.cc b/FWCore/Common/test/test_catch2_ProcessBlockHelpers.cc index a502e50f1a69a..b7a0f3ea762d0 100644 --- a/FWCore/Common/test/test_catch2_ProcessBlockHelpers.cc +++ b/FWCore/Common/test/test_catch2_ProcessBlockHelpers.cc @@ -1,5 +1,5 @@ //#define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Common/interface/OutputProcessBlockHelper.h" #include "FWCore/Common/interface/ProcessBlockHelper.h" diff --git a/FWCore/Common/test/test_catch2_TriggerNames.cc b/FWCore/Common/test/test_catch2_TriggerNames.cc index e7a5264b5f31e..8296e859cc143 100644 --- a/FWCore/Common/test/test_catch2_TriggerNames.cc +++ b/FWCore/Common/test/test_catch2_TriggerNames.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Common/interface/TriggerNames.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include diff --git a/FWCore/Concurrency/test/test2_catch2_limitedtaskqueue.cc b/FWCore/Concurrency/test/test2_catch2_limitedtaskqueue.cc index 7f98f1337ab3f..6ef64d4d907bb 100644 --- a/FWCore/Concurrency/test/test2_catch2_limitedtaskqueue.cc +++ b/FWCore/Concurrency/test/test2_catch2_limitedtaskqueue.cc @@ -6,7 +6,7 @@ // #include -#include +#include #include #include #include @@ -65,17 +65,17 @@ TEST_CASE("LimitedTaskQueue", "[LimitedTaskQueue]") { oneapi::tbb::task_group group; edm::FinalWaitingTask lastTask(group); edm::WaitingTaskHolder waitingTask(group, &lastTask); - queue.push(group, [&count, waitingTask, kMax] { + queue.push(group, [&count, waitingTask] { SAFE_REQUIRE(count++ < kMax); std::this_thread::sleep_for(10us); --count; }); - queue.push(group, [&count, waitingTask, kMax] { + queue.push(group, [&count, waitingTask] { SAFE_REQUIRE(count++ < kMax); std::this_thread::sleep_for(10us); --count; }); - queue.push(group, [&count, lastTask = std::move(waitingTask), kMax] { + queue.push(group, [&count, lastTask = std::move(waitingTask)] { SAFE_REQUIRE(count++ < kMax); std::this_thread::sleep_for(10us); --count; @@ -159,11 +159,11 @@ TEST_CASE("LimitedTaskQueue", "[LimitedTaskQueue]") { { edm::WaitingTaskHolder waitingTask(group, &lastTask); - group.run([&queue, &waitToStart, &group, waitingTask, &count, &nRunningTasks, kMax] { + group.run([&queue, &waitToStart, &group, waitingTask, &count, &nRunningTasks] { while (waitToStart) { } for (unsigned int i = 0; i < nTasks; ++i) { - queue.push(group, [&count, waitingTask, &nRunningTasks, kMax] { + queue.push(group, [&count, waitingTask, &nRunningTasks] { auto nrt = nRunningTasks++; if (nrt >= kMax) { std::cout << "ERROR " << nRunningTasks << " >= " << kMax << std::endl; @@ -174,10 +174,10 @@ TEST_CASE("LimitedTaskQueue", "[LimitedTaskQueue]") { }); } }); - group.run([&queue, &waitToStart, &group, waitingTask, &count, &nRunningTasks, kMax] { + group.run([&queue, &waitToStart, &group, waitingTask, &count, &nRunningTasks] { waitToStart = false; for (unsigned int i = 0; i < nTasks; ++i) { - queue.push(group, [&count, waitingTask, &nRunningTasks, kMax] { + queue.push(group, [&count, waitingTask, &nRunningTasks] { auto nrt = nRunningTasks++; if (nrt >= kMax) { std::cout << "ERROR " << nRunningTasks << " >= " << kMax << std::endl; diff --git a/FWCore/Concurrency/test/test2_catch2_serialtaskqueue.cc b/FWCore/Concurrency/test/test2_catch2_serialtaskqueue.cc index de8bade27f181..f1efbe0482d03 100644 --- a/FWCore/Concurrency/test/test2_catch2_serialtaskqueue.cc +++ b/FWCore/Concurrency/test/test2_catch2_serialtaskqueue.cc @@ -8,7 +8,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include #include #include diff --git a/FWCore/Concurrency/test/test2_catch2_serialtaskqueuechain.cc b/FWCore/Concurrency/test/test2_catch2_serialtaskqueuechain.cc index be7fcc5dd16e1..8196a70ffa974 100644 --- a/FWCore/Concurrency/test/test2_catch2_serialtaskqueuechain.cc +++ b/FWCore/Concurrency/test/test2_catch2_serialtaskqueuechain.cc @@ -5,7 +5,7 @@ // Created by Chris Jones on 9/27/11. // -#include +#include #include #include #include diff --git a/FWCore/Concurrency/test/test2_catch2_waitingtasklist.cc b/FWCore/Concurrency/test/test2_catch2_waitingtasklist.cc index c54633c0974f5..90f92b14715f7 100644 --- a/FWCore/Concurrency/test/test2_catch2_waitingtasklist.cc +++ b/FWCore/Concurrency/test/test2_catch2_waitingtasklist.cc @@ -6,7 +6,7 @@ // #include -#include +#include #include #include #include diff --git a/FWCore/Concurrency/test/test_catch2_Async.cc b/FWCore/Concurrency/test/test_catch2_Async.cc index 0c02282a2fe10..26fd077fc1c6a 100644 --- a/FWCore/Concurrency/test/test_catch2_Async.cc +++ b/FWCore/Concurrency/test/test_catch2_Async.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include @@ -30,7 +30,7 @@ namespace { }; } // namespace -TEST_CASE("Test Async", "[edm::Async") { +TEST_CASE("Test Async", "[edm::Async]") { // Using parallelism 2 here because otherwise the // tbb::task_arena::enqueue() in WaitingTaskWithArenaHolder will // start a new TBB thread that "inherits" the name from the @@ -92,6 +92,6 @@ TEST_CASE("Test Async", "[edm::Async") { REQUIRE(waitTask.done()); REQUIRE(waitTask.exceptionPtr()); REQUIRE_THROWS_WITH(std::rethrow_exception(waitTask.exceptionPtr()), - Catch::Contains("Calling run in this context is not allowed")); + Catch::Matchers::ContainsSubstring("Calling run in this context is not allowed")); } } diff --git a/FWCore/Concurrency/test/test_catch2_WaitingTaskChain.cc b/FWCore/Concurrency/test/test_catch2_WaitingTaskChain.cc index 326896dcddd8f..d16be330aa89b 100644 --- a/FWCore/Concurrency/test/test_catch2_WaitingTaskChain.cc +++ b/FWCore/Concurrency/test/test_catch2_WaitingTaskChain.cc @@ -6,7 +6,7 @@ // #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "oneapi/tbb/global_control.h" diff --git a/FWCore/Concurrency/test/test_catch2_WaitingThreadPool.cc b/FWCore/Concurrency/test/test_catch2_WaitingThreadPool.cc index c6ad896ce79ba..11774640361b3 100644 --- a/FWCore/Concurrency/test/test_catch2_WaitingThreadPool.cc +++ b/FWCore/Concurrency/test/test_catch2_WaitingThreadPool.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "oneapi/tbb/global_control.h" @@ -11,7 +11,7 @@ namespace { constexpr char const* errorContext() { return "WaitingThreadPool test"; } } // namespace -TEST_CASE("Test WaitingThreadPool", "[edm::WaitingThreadPool") { +TEST_CASE("Test WaitingThreadPool", "[edm::WaitingThreadPool]") { // Using parallelism 2 here because otherwise the // tbb::task_arena::enqueue() in WaitingTaskWithArenaHolder will // start a new TBB thread that "inherits" the name from the @@ -126,9 +126,10 @@ TEST_CASE("Test WaitingThreadPool", "[edm::WaitingThreadPool") { lastTask(edm::WaitingTaskHolder(group, &waitTask)); h.doneWaiting(std::exception_ptr()); } - REQUIRE_THROWS_WITH( - waitTask.wait(), - Catch::Contains("error") and Catch::Contains("StdException") and Catch::Contains("WaitingThreadPool test")); + REQUIRE_THROWS_WITH(waitTask.wait(), + Catch::Matchers::ContainsSubstring("error") and + Catch::Matchers::ContainsSubstring("StdException") and + Catch::Matchers::ContainsSubstring("WaitingThreadPool test")); REQUIRE(count.load() == 0); } diff --git a/FWCore/Framework/test/EventSelExc_t.cpp b/FWCore/Framework/test/EventSelExc_t.cpp index ab660da2c5439..3f48200731584 100644 --- a/FWCore/Framework/test/EventSelExc_t.cpp +++ b/FWCore/Framework/test/EventSelExc_t.cpp @@ -13,7 +13,7 @@ // 11 - Exception demanded // 12 - Specific and wildcarded exceptions // 13 - Everything - also tests that it accepts all Ready -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Framework/interface/EventSelector.h" #include "DataFormats/Common/interface/TriggerResults.h" @@ -208,8 +208,9 @@ void evSelTest(PathSpecifiers const& ps, TrigResults const& tr, bool ans) { << "pathspecs = " << ps.path << "\n" << "trigger results = " << tr << "\n"; } - REQUIRE_THAT(ans, - Catch::Predicate([a, b, aa](auto ans) { return a == ans and b == ans and aa == ans; }, s.str())); + REQUIRE_THAT( + ans, + Catch::Matchers::Predicate([a, b, aa](auto ans) { return a == ans and b == ans and aa == ans; }, s.str())); // Repeat putting the list of trigger names in the pset // registry @@ -230,7 +231,7 @@ void evSelTest(PathSpecifiers const& ps, TrigResults const& tr, bool ans) { << "pathspecs =" << ps.path << "\n" << "trigger results = " << tr << "\n"; } - REQUIRE_THAT(ans, Catch::Predicate([x, y](auto ans) { return x == ans and y == ans; }, s.str())); + REQUIRE_THAT(ans, Catch::Matchers::Predicate([x, y](auto ans) { return x == ans and y == ans; }, s.str())); } TEST_CASE("test EventSelector test", "[EventSelector]") { diff --git a/FWCore/Framework/test/EventSelOverlap_t.cpp b/FWCore/Framework/test/EventSelOverlap_t.cpp index 8e34a2ad73307..3470f64ce5bc6 100644 --- a/FWCore/Framework/test/EventSelOverlap_t.cpp +++ b/FWCore/Framework/test/EventSelOverlap_t.cpp @@ -3,7 +3,7 @@ // maskTriggerResults // Note - work in progress - only very cursory testing is done right now! -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Framework/interface/EventSelector.h" #include "DataFormats/Common/interface/TriggerResults.h" @@ -194,7 +194,7 @@ namespace { << "pathspecs = " << ps.path << "\n" << "trigger results = " << tr << "\n"; } - REQUIRE_THAT(ok, Catch::Predicate([](bool iValue) { return iValue; }, s.str())); + REQUIRE_THAT(ok, Catch::Matchers::Predicate([](bool iValue) { return iValue; }, s.str())); } } // namespace TEST_CASE("test EventSelector overlap", "[EventSelector overlap]") { diff --git a/FWCore/Framework/test/EventSelWildcard_t.cpp b/FWCore/Framework/test/EventSelWildcard_t.cpp index dea4c610d02de..bbcff5962446c 100644 --- a/FWCore/Framework/test/EventSelWildcard_t.cpp +++ b/FWCore/Framework/test/EventSelWildcard_t.cpp @@ -1,5 +1,5 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Framework/interface/EventSelector.h" #include "DataFormats/Common/interface/TriggerResults.h" @@ -105,7 +105,7 @@ namespace { << "jmask = " << jmask << "\n"; } REQUIRE_THAT(answer, - Catch::Predicate( + Catch::Matchers::Predicate( [a, b, aa](bool answer) { return a == answer and b == answer and aa == answer; }, s.str())); // Repeat putting the list of trigger names in the pset @@ -128,7 +128,8 @@ namespace { << "mask=" << mask << "\n" << "jmask = " << jmask << "\n"; } - REQUIRE_THAT(answer, Catch::Predicate([x, y](bool answer) { return x == answer and y == answer; }, s.str())); + REQUIRE_THAT( + answer, Catch::Matchers::Predicate([x, y](bool answer) { return x == answer and y == answer; }, s.str())); } void testall(const Strings& paths, const VStrings& patterns, const VBools& masks, const Answers& answers) { diff --git a/FWCore/Framework/test/EventSelector_t.cpp b/FWCore/Framework/test/EventSelector_t.cpp index 2935fd38673ea..d4fbf5d128e38 100644 --- a/FWCore/Framework/test/EventSelector_t.cpp +++ b/FWCore/Framework/test/EventSelector_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Framework/interface/EventSelector.h" #include "DataFormats/Common/interface/TriggerResults.h" @@ -103,7 +103,7 @@ void testone(const Strings& paths, const Strings& pattern, const Bools& mask, bo } REQUIRE_THAT( answer, - Catch::Predicate( + Catch::Matchers::Predicate( [a1, a2, b2, c1](auto answer) { return a1 == answer and a2 == answer and b2 == answer and c1 == answer; }, s.str())); @@ -133,8 +133,8 @@ void testone(const Strings& paths, const Strings& pattern, const Bools& mask, bo } REQUIRE_THAT( answer, - Catch::Predicate([a11, a12, a13](auto answer) { return a11 == answer and a12 == answer and a13 == answer; }, - s.str())); + Catch::Matchers::Predicate( + [a11, a12, a13](auto answer) { return a11 == answer and a12 == answer and a13 == answer; }, s.str())); } void testall(const Strings& paths, const VStrings& patterns, const VBools& masks, const Answers& answers) { diff --git a/FWCore/Framework/test/ProductSelector_t.cpp b/FWCore/Framework/test/ProductSelector_t.cpp index 0114ac05b6cc5..4f693cdd09ae6 100644 --- a/FWCore/Framework/test/ProductSelector_t.cpp +++ b/FWCore/Framework/test/ProductSelector_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include #include @@ -243,9 +243,9 @@ TEST_CASE("test ProductSelector", "[ProductSelector]") { cmds.push_back(bad_rule); bad.addUntrackedParameter >("outputCommands", cmds); bad.registerIt(); - REQUIRE_THROWS_MATCHES( - edm::ProductSelectorRules(bad, "outputCommands", "ProductSelectorTest"), - edm::Exception, - Catch::Predicate([](auto const& x) { return x.categoryCode() == edm::errors::Configuration; })); + REQUIRE_THROWS_MATCHES(edm::ProductSelectorRules(bad, "outputCommands", "ProductSelectorTest"), + edm::Exception, + Catch::Matchers::Predicate( + [](auto const& x) { return x.categoryCode() == edm::errors::Configuration; })); } } diff --git a/FWCore/Framework/test/TriggerResultsBasedEventSelectorUtilities_t.cpp b/FWCore/Framework/test/TriggerResultsBasedEventSelectorUtilities_t.cpp index 1a6044df221fc..f55170d7e74cb 100644 --- a/FWCore/Framework/test/TriggerResultsBasedEventSelectorUtilities_t.cpp +++ b/FWCore/Framework/test/TriggerResultsBasedEventSelectorUtilities_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" namespace trigger_results_based_event_selector_utils { // Implemented in TriggerResultsBasedEventSelector.cc void remove_whitespace(std::string& s); diff --git a/FWCore/Framework/test/test_catch2_CmsRunParser.cc b/FWCore/Framework/test/test_catch2_CmsRunParser.cc index e9de451079c7f..dda61d476ebe4 100644 --- a/FWCore/Framework/test/test_catch2_CmsRunParser.cc +++ b/FWCore/Framework/test/test_catch2_CmsRunParser.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Framework/interface/CmsRunParser.h" #include "FWCore/Utilities/interface/EDMException.h" diff --git a/FWCore/Framework/test/test_catch2_ESHandle.cc b/FWCore/Framework/test/test_catch2_ESHandle.cc index 652e04768475d..d903988bf9aa0 100644 --- a/FWCore/Framework/test/test_catch2_ESHandle.cc +++ b/FWCore/Framework/test/test_catch2_ESHandle.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Utilities/interface/EDMException.h" diff --git a/FWCore/Framework/test/test_catch2_ModuleHolderFactory.cc b/FWCore/Framework/test/test_catch2_ModuleHolderFactory.cc index 599cf842c8a0c..0d574c62c3b11 100644 --- a/FWCore/Framework/test/test_catch2_ModuleHolderFactory.cc +++ b/FWCore/Framework/test/test_catch2_ModuleHolderFactory.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Framework/src/ModuleHolderFactory.h" #include "FWCore/Framework/interface/global/EDProducer.h" @@ -86,10 +86,10 @@ TEST_CASE("test edm::Factory", "[Factory]") { pset.addParameter("@module_type", "DoesNotExistModule"); pset.addParameter("@module_edm_type", "EDProducer"); edm::test::SimpleTestTypeResolverMaker resolver; - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; CHECK_THROWS_WITH( factory->makeModule(MakeModuleParams(&pset, prodReg, &preallocConfig, procConfig), &resolver, pre, post), - Contains("DoesNotExistModule")); + ContainsSubstring("DoesNotExistModule")); } SECTION("test missing plugin with complex resolver") { auto factory = ModuleHolderFactory::get(); @@ -97,11 +97,11 @@ TEST_CASE("test edm::Factory", "[Factory]") { pset.addParameter("@module_type", "generic::DoesNotExistModule"); pset.addParameter("@module_edm_type", "EDProducer"); edm::test::ComplexTestTypeResolverMaker resolver; - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; CHECK_THROWS_WITH( factory->makeModule(MakeModuleParams(&pset, prodReg, &preallocConfig, procConfig), &resolver, pre, post), - Contains("generic::DoesNotExistModule") && Contains("edm::test::other::DoesNotExistModule") && - Contains("edm::test::cpu::DoesNotExistModule")); + ContainsSubstring("generic::DoesNotExistModule") && ContainsSubstring("edm::test::other::DoesNotExistModule") && + ContainsSubstring("edm::test::cpu::DoesNotExistModule")); } SECTION("test missing plugin with configurable resolver") { auto factory = ModuleHolderFactory::get(); @@ -110,29 +110,32 @@ TEST_CASE("test edm::Factory", "[Factory]") { pset.addParameter("@module_edm_type", "EDProducer"); SECTION("default behavior") { edm::test::ConfigurableTestTypeResolverMaker resolver; - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; CHECK_THROWS_WITH( factory->makeModule(MakeModuleParams(&pset, prodReg, &preallocConfig, procConfig), &resolver, pre, post), - Contains("generic::DoesNotExistModule") && Contains("edm::test::other::DoesNotExistModule") && - Contains("edm::test::cpu::DoesNotExistModule")); + ContainsSubstring("generic::DoesNotExistModule") && + ContainsSubstring("edm::test::other::DoesNotExistModule") && + ContainsSubstring("edm::test::cpu::DoesNotExistModule")); } SECTION("set variant to other") { pset.addUntrackedParameter("variant", "other"); edm::test::ConfigurableTestTypeResolverMaker resolver; - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; CHECK_THROWS_WITH( factory->makeModule(MakeModuleParams(&pset, prodReg, &preallocConfig, procConfig), &resolver, pre, post), - Contains("generic::DoesNotExistModule") && Contains("edm::test::other::DoesNotExistModule") && - not Contains("edm::test::cpu::DoesNotExistModule")); + ContainsSubstring("generic::DoesNotExistModule") && + ContainsSubstring("edm::test::other::DoesNotExistModule") && + not ContainsSubstring("edm::test::cpu::DoesNotExistModule")); } SECTION("set variant to cpu") { pset.addUntrackedParameter("variant", "cpu"); edm::test::ConfigurableTestTypeResolverMaker resolver; - using Catch::Matchers::Contains; + using Catch::Matchers::ContainsSubstring; CHECK_THROWS_WITH( factory->makeModule(MakeModuleParams(&pset, prodReg, &preallocConfig, procConfig), &resolver, pre, post), - Contains("generic::DoesNotExistModule") && not Contains("edm::test::other::DoesNotExistModule") && - Contains("edm::test::cpu::DoesNotExistModule")); + ContainsSubstring("generic::DoesNotExistModule") && + not ContainsSubstring("edm::test::other::DoesNotExistModule") && + ContainsSubstring("edm::test::cpu::DoesNotExistModule")); } } diff --git a/FWCore/Framework/test/test_catch2_ScheduleBuilder.cc b/FWCore/Framework/test/test_catch2_ScheduleBuilder.cc index e867a99ef8472..8be3100ef8c51 100644 --- a/FWCore/Framework/test/test_catch2_ScheduleBuilder.cc +++ b/FWCore/Framework/test/test_catch2_ScheduleBuilder.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Framework/src/ScheduleBuilder.h" #include "FWCore/Framework/interface/global/EDProducer.h" diff --git a/FWCore/Framework/test/test_catch2_main.cc b/FWCore/Framework/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/FWCore/Framework/test/test_catch2_main.cc +++ b/FWCore/Framework/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/FWCore/Framework/test/test_catch2notTP_ESRecordsToProductResolverIndices.cc b/FWCore/Framework/test/test_catch2notTP_ESRecordsToProductResolverIndices.cc index 82a301b2dd517..f426d842aee90 100644 --- a/FWCore/Framework/test/test_catch2notTP_ESRecordsToProductResolverIndices.cc +++ b/FWCore/Framework/test/test_catch2notTP_ESRecordsToProductResolverIndices.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Framework/interface/ESRecordsToProductResolverIndices.h" #include "FWCore/Framework/interface/ComponentDescription.h" diff --git a/FWCore/Framework/test/test_catch2notTP_InputProcessBlock.cc b/FWCore/Framework/test/test_catch2notTP_InputProcessBlock.cc index c2065640125bf..a43380b93c03e 100644 --- a/FWCore/Framework/test/test_catch2notTP_InputProcessBlock.cc +++ b/FWCore/Framework/test/test_catch2notTP_InputProcessBlock.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Framework/interface/InputProcessBlockCacheImpl.h" #include "FWCore/Framework/interface/moduleAbilities.h" diff --git a/FWCore/Framework/test/test_catch2notTP_InputProcessBlockCacheHolder.cc b/FWCore/Framework/test/test_catch2notTP_InputProcessBlockCacheHolder.cc index 8d14cfae4d5f9..dff2f12452323 100644 --- a/FWCore/Framework/test/test_catch2notTP_InputProcessBlockCacheHolder.cc +++ b/FWCore/Framework/test/test_catch2notTP_InputProcessBlockCacheHolder.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Framework/interface/InputProcessBlockCacheImpl.h" #include "FWCore/Framework/interface/global/EDProducerBase.h" diff --git a/FWCore/Framework/test/test_catch2notTP_MergeableRunProductMetadata.cc b/FWCore/Framework/test/test_catch2notTP_MergeableRunProductMetadata.cc index b7c8d588f8bd0..b78dbee1bd2f9 100644 --- a/FWCore/Framework/test/test_catch2notTP_MergeableRunProductMetadata.cc +++ b/FWCore/Framework/test/test_catch2notTP_MergeableRunProductMetadata.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Provenance/interface/ProductDescription.h" #include "DataFormats/Provenance/interface/IndexIntoFile.h" diff --git a/FWCore/Integration/test/EDAlias_t.cpp b/FWCore/Integration/test/EDAlias_t.cpp index d7063c7bf065a..95b1c06271e12 100644 --- a/FWCore/Integration/test/EDAlias_t.cpp +++ b/FWCore/Integration/test/EDAlias_t.cpp @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/TestObjects/interface/ToyProducts.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" @@ -81,11 +81,13 @@ process.moduleToTest(process.test, cms.Task(process.intprod)) edm::test::TestProcessor::Config config{baseConfig}; SECTION("Alias with two instances pointing to the same product is not allowed") { - REQUIRE_THROWS_WITH( - edm::test::TestProcessor(config), - Catch::Contains("EDAlias conflict") && Catch::Contains("is used for multiple products of type") && - Catch::Contains("with module label") && Catch::Contains("and instance name") && - Catch::Contains("alias has the instance name") && Catch::Contains("and the other has the instance name")); + REQUIRE_THROWS_WITH(edm::test::TestProcessor(config), + Catch::Matchers::ContainsSubstring("EDAlias conflict") && + Catch::Matchers::ContainsSubstring("is used for multiple products of type") && + Catch::Matchers::ContainsSubstring("with module label") && + Catch::Matchers::ContainsSubstring("and instance name") && + Catch::Matchers::ContainsSubstring("alias has the instance name") && + Catch::Matchers::ContainsSubstring("and the other has the instance name")); } } @@ -112,9 +114,11 @@ process.moduleToTest(process.test, cms.Task(process.intprod)) SECTION("Alias with two instances pointing to the same product is not allowed") { REQUIRE_THROWS_WITH(edm::test::TestProcessor(config), - Catch::Contains("EDAlias conflict") && Catch::Contains("and product instance alias") && - Catch::Contains("are used for multiple products of type") && - Catch::Contains("One has module label") && Catch::Contains("the other has module label")); + Catch::Matchers::ContainsSubstring("EDAlias conflict") && + Catch::Matchers::ContainsSubstring("and product instance alias") && + Catch::Matchers::ContainsSubstring("are used for multiple products of type") && + Catch::Matchers::ContainsSubstring("One has module label") && + Catch::Matchers::ContainsSubstring("the other has module label")); } } @@ -232,12 +236,12 @@ process.moduleToTest(process.test, cms.Task(process.intprod)) { edm::test::TestProcessor::Config config{std::format(baseConfig, "'intalias:foo'")}; edm::test::TestProcessor tester(config); - REQUIRE_THROWS_WITH(tester.test(), Catch::Contains("ProductNotFound")); + REQUIRE_THROWS_WITH(tester.test(), Catch::Matchers::ContainsSubstring("ProductNotFound")); } { edm::test::TestProcessor::Config config{std::format(baseConfig, "'intalias'")}; edm::test::TestProcessor tester(config); - REQUIRE_THROWS_WITH(tester.test(), Catch::Contains("ProductNotFound")); + REQUIRE_THROWS_WITH(tester.test(), Catch::Matchers::ContainsSubstring("ProductNotFound")); } } } @@ -343,7 +347,8 @@ process.moduleToTest(process.test, cms.Task(process.intprod)) REQUIRE_THROWS_WITH( edm::test::TestProcessor(config), - Catch::Contains("There are no products with module label 'intprod' and product instance name 'nonexistent'")); + Catch::Matchers::ContainsSubstring( + "There are no products with module label 'intprod' and product instance name 'nonexistent'")); } SECTION("Instance wildcard") { @@ -351,7 +356,7 @@ process.moduleToTest(process.test, cms.Task(process.intprod)) std::format(baseConfig, "intprod = cms.VPSet(cms.PSet(type = cms.string('nonexistentType')))")}; REQUIRE_THROWS_WITH(edm::test::TestProcessor(config), - Catch::Contains("There are no products of type 'nonexistentType'") && - Catch::Contains("with module label 'intprod'")); + Catch::Matchers::ContainsSubstring("There are no products of type 'nonexistentType'") && + Catch::Matchers::ContainsSubstring("with module label 'intprod'")); } } diff --git a/FWCore/Integration/test/ProcessAccelerator_t.cpp b/FWCore/Integration/test/ProcessAccelerator_t.cpp index e55a390321f74..6be5c733b1eaf 100644 --- a/FWCore/Integration/test/ProcessAccelerator_t.cpp +++ b/FWCore/Integration/test/ProcessAccelerator_t.cpp @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/TestObjects/interface/ToyProducts.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" @@ -93,7 +93,7 @@ TEST_CASE("Configuration with ModuleTypeResolver", s_tag) { edm::makeParameterSets(baseConfigOtherDisabled_auto, psetOtherDisabled_auto); edm::makeParameterSets(baseConfigOtherDisabled_cpu, psetOtherDisabled_cpu); REQUIRE_THROWS_WITH(edm::makeParameterSets(baseConfigOtherDisabled_other, psetOtherDisabled_other), - Catch::Contains("UnavailableAccelerator")); + Catch::Matchers::ContainsSubstring("UnavailableAccelerator")); pset_auto->registerIt(); pset_cpu->registerIt(); pset_other->registerIt(); diff --git a/FWCore/Integration/test/ProcessConfiguration_t.cpp b/FWCore/Integration/test/ProcessConfiguration_t.cpp index 348b34ad96e75..a9263e2912aec 100644 --- a/FWCore/Integration/test/ProcessConfiguration_t.cpp +++ b/FWCore/Integration/test/ProcessConfiguration_t.cpp @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Provenance/interface/ProcessConfiguration.h" #include "DataFormats/Provenance/interface/ParameterSetID.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" diff --git a/FWCore/Integration/test/ProcessHistory_t.cpp b/FWCore/Integration/test/ProcessHistory_t.cpp index ca5ac4f84dacf..4a35150e632d6 100644 --- a/FWCore/Integration/test/ProcessHistory_t.cpp +++ b/FWCore/Integration/test/ProcessHistory_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Provenance/interface/ProcessHistory.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "DataFormats/Provenance/interface/IndexIntoFile.h" diff --git a/FWCore/Integration/test/RandomIntProducer_t.cpp b/FWCore/Integration/test/RandomIntProducer_t.cpp index b91144b16d7ed..1433c1d988d38 100644 --- a/FWCore/Integration/test/RandomIntProducer_t.cpp +++ b/FWCore/Integration/test/RandomIntProducer_t.cpp @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/TestObjects/interface/ToyProducts.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" diff --git a/FWCore/Modules/test/test_catch2_LogErrorFilter.cc b/FWCore/Modules/test/test_catch2_LogErrorFilter.cc index 594389ee0f429..d1be18559df71 100644 --- a/FWCore/Modules/test/test_catch2_LogErrorFilter.cc +++ b/FWCore/Modules/test/test_catch2_LogErrorFilter.cc @@ -3,7 +3,7 @@ #include "DataFormats/Common/interface/ErrorSummaryEntry.h" #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" static constexpr auto s_tag = "[LogErrorFilter]"; TEST_CASE("Tests of LogErrorFilter", s_tag) { diff --git a/FWCore/Modules/test/test_catch2_ModuloEventIDFilter.cc b/FWCore/Modules/test/test_catch2_ModuloEventIDFilter.cc index d862b2ec8f50a..755c76691fc99 100644 --- a/FWCore/Modules/test/test_catch2_ModuloEventIDFilter.cc +++ b/FWCore/Modules/test/test_catch2_ModuloEventIDFilter.cc @@ -1,7 +1,7 @@ #include "FWCore/TestProcessor/interface/TestProcessor.h" #include "FWCore/Utilities/interface/Exception.h" -#include "catch.hpp" +#include "catch2/catch_all.hpp" static constexpr auto s_tag = "[ModuloEventIDFilter]"; diff --git a/FWCore/Modules/test/test_catch2_PathStatusFilter.cc b/FWCore/Modules/test/test_catch2_PathStatusFilter.cc index d4e48f56966d8..d3cb91f2ff9cf 100644 --- a/FWCore/Modules/test/test_catch2_PathStatusFilter.cc +++ b/FWCore/Modules/test/test_catch2_PathStatusFilter.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/TestProcessor/interface/TestProcessor.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/FWCore/Modules/test/test_catch2_Prescaler.cc b/FWCore/Modules/test/test_catch2_Prescaler.cc index ccb3b10efda89..ddc23d45b06b6 100644 --- a/FWCore/Modules/test/test_catch2_Prescaler.cc +++ b/FWCore/Modules/test/test_catch2_Prescaler.cc @@ -1,7 +1,7 @@ #include "FWCore/TestProcessor/interface/TestProcessor.h" #include "FWCore/Utilities/interface/Exception.h" -#include "catch.hpp" +#include "catch2/catch_all.hpp" static constexpr auto s_tag = "[Prescaler]"; TEST_CASE("Check parameters of Prescaler", s_tag) { diff --git a/FWCore/Modules/test/test_catch2_main.cc b/FWCore/Modules/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/FWCore/Modules/test/test_catch2_main.cc +++ b/FWCore/Modules/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/FWCore/ParameterSet/test/test_catch2_ps.cc b/FWCore/ParameterSet/test/test_catch2_ps.cc index 1f0829f883b11..8498005bcefd8 100644 --- a/FWCore/ParameterSet/test/test_catch2_ps.cc +++ b/FWCore/ParameterSet/test/test_catch2_ps.cc @@ -1,7 +1,7 @@ /* */ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include @@ -18,6 +18,9 @@ namespace edm { bool operator!=(const edm::EventRange& iLHS, const edm::EventRange& iRHS) { return ((iLHS.startEventID() != iRHS.startEventID()) or (iLHS.endEventID() != iRHS.endEventID())); } + bool operator==(const edm::EventRange& iLHS, const edm::EventRange& iRHS) { + return ((iLHS.startEventID() == iRHS.startEventID()) or (iLHS.endEventID() == iRHS.endEventID())); + } } // namespace edm namespace { void do_compare(const edm::EventRange& iLHS, const edm::EventRange& iRHS) { diff --git a/FWCore/ParameterSet/test/test_catch_ParameterSetDescription.cc b/FWCore/ParameterSet/test/test_catch_ParameterSetDescription.cc index 51e32715095b0..7af24c0b380d9 100644 --- a/FWCore/ParameterSet/test/test_catch_ParameterSetDescription.cc +++ b/FWCore/ParameterSet/test/test_catch_ParameterSetDescription.cc @@ -2,7 +2,7 @@ // Test code for the ParameterSetDescription and ParameterDescription // classes. -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "DataFormats/Provenance/interface/EventID.h" #include "DataFormats/Provenance/interface/LuminosityBlockID.h" diff --git a/FWCore/Services/test/test_catch2_ExternalRandomNumberGeneratorService.cc b/FWCore/Services/test/test_catch2_ExternalRandomNumberGeneratorService.cc index bd9cac3180438..8a102d23a7eb8 100644 --- a/FWCore/Services/test/test_catch2_ExternalRandomNumberGeneratorService.cc +++ b/FWCore/Services/test/test_catch2_ExternalRandomNumberGeneratorService.cc @@ -6,7 +6,7 @@ #include "CLHEP/Random/MixMaxRng.h" //#define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" namespace { void test(CLHEP::HepRandomEngine& iRand, CLHEP::HepRandomEngine& iEngine) { diff --git a/FWCore/Services/test/test_catch2_SiteLocalConfigService.cc b/FWCore/Services/test/test_catch2_SiteLocalConfigService.cc index 09e201c9805c6..806231669103f 100644 --- a/FWCore/Services/test/test_catch2_SiteLocalConfigService.cc +++ b/FWCore/Services/test/test_catch2_SiteLocalConfigService.cc @@ -4,7 +4,7 @@ #include "FWCore/Utilities/interface/Exception.h" #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" TEST_CASE("Test SiteLocalConfigService", "[sitelocalconfig]") { std::string dirString; diff --git a/FWCore/Services/test/test_catch2_cpu_features.cc b/FWCore/Services/test/test_catch2_cpu_features.cc index 6e15e71ac021d..f49bda60d7edf 100644 --- a/FWCore/Services/test/test_catch2_cpu_features.cc +++ b/FWCore/Services/test/test_catch2_cpu_features.cc @@ -1,6 +1,6 @@ #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "cpu_features/cpu_features_macros.h" diff --git a/FWCore/SharedMemory/test/test_catch2_buffer.cc b/FWCore/SharedMemory/test/test_catch2_buffer.cc index 5b99f8887f63a..0f7fea9ee1a68 100644 --- a/FWCore/SharedMemory/test/test_catch2_buffer.cc +++ b/FWCore/SharedMemory/test/test_catch2_buffer.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include #include diff --git a/FWCore/SharedMemory/test/test_catch2_main.cc b/FWCore/SharedMemory/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/FWCore/SharedMemory/test/test_catch2_main.cc +++ b/FWCore/SharedMemory/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/FWCore/SharedMemory/test/test_catch2_serialize.cc b/FWCore/SharedMemory/test/test_catch2_serialize.cc index 1e7cffb580b7a..a2e5b821ae686 100644 --- a/FWCore/SharedMemory/test/test_catch2_serialize.cc +++ b/FWCore/SharedMemory/test/test_catch2_serialize.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include #include diff --git a/FWCore/Utilities/test/test_catch2HRTime.cc b/FWCore/Utilities/test/test_catch2HRTime.cc index 2820f29eb58e6..ba59e8c409bab 100644 --- a/FWCore/Utilities/test/test_catch2HRTime.cc +++ b/FWCore/Utilities/test/test_catch2HRTime.cc @@ -5,7 +5,7 @@ #include #include -#include +#include namespace { diff --git a/FWCore/Utilities/test/test_catch2Slow_cputimer.cc b/FWCore/Utilities/test/test_catch2Slow_cputimer.cc index 13415f56338c7..8ea97ed56a2b9 100644 --- a/FWCore/Utilities/test/test_catch2Slow_cputimer.cc +++ b/FWCore/Utilities/test/test_catch2Slow_cputimer.cc @@ -7,7 +7,7 @@ Test program for edm::TypeIDBase class. #include #include #include -#include +#include #include "FWCore/Utilities/interface/CPUTimer.h" using std::cerr; diff --git a/FWCore/Utilities/test/test_catch2_Digest.cc b/FWCore/Utilities/test/test_catch2_Digest.cc index f5aeb10418de7..3aba8c62495de 100644 --- a/FWCore/Utilities/test/test_catch2_Digest.cc +++ b/FWCore/Utilities/test/test_catch2_Digest.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Utilities/interface/Digest.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/FWCore/Utilities/test/test_catch2_EDGetToken.cc b/FWCore/Utilities/test/test_catch2_EDGetToken.cc index 7b92ac9a78499..b77556109d121 100644 --- a/FWCore/Utilities/test/test_catch2_EDGetToken.cc +++ b/FWCore/Utilities/test/test_catch2_EDGetToken.cc @@ -1,6 +1,6 @@ #include #include "FWCore/Utilities/interface/EDGetToken.h" -#include "catch.hpp" +#include "catch2/catch_all.hpp" namespace edm { class TestEDGetToken { diff --git a/FWCore/Utilities/test/test_catch2_EDMException.cc b/FWCore/Utilities/test/test_catch2_EDMException.cc index cb0eae4b85fdf..4fcccdb8ce052 100644 --- a/FWCore/Utilities/test/test_catch2_EDMException.cc +++ b/FWCore/Utilities/test/test_catch2_EDMException.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Utilities/interface/EDMException.h" #include diff --git a/FWCore/Utilities/test/test_catch2_Exception.cc b/FWCore/Utilities/test/test_catch2_Exception.cc index 479f59ab84edc..6f1bcf148ecae 100644 --- a/FWCore/Utilities/test/test_catch2_Exception.cc +++ b/FWCore/Utilities/test/test_catch2_Exception.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Utilities/interface/Exception.h" #include #include diff --git a/FWCore/Utilities/test/test_catch2_Guid.cc b/FWCore/Utilities/test/test_catch2_Guid.cc index b768c4bb7ed46..776ad305a69a2 100644 --- a/FWCore/Utilities/test/test_catch2_Guid.cc +++ b/FWCore/Utilities/test/test_catch2_Guid.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Utilities/interface/Guid.h" TEST_CASE( diff --git a/FWCore/Utilities/test/test_catch2_InputTag.cc b/FWCore/Utilities/test/test_catch2_InputTag.cc index 875f0f0b16322..7be9b2f40f3d7 100644 --- a/FWCore/Utilities/test/test_catch2_InputTag.cc +++ b/FWCore/Utilities/test/test_catch2_InputTag.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/Utilities/interface/TypeID.h" diff --git a/FWCore/Utilities/test/test_catch2_OftenEmptyCString.cc b/FWCore/Utilities/test/test_catch2_OftenEmptyCString.cc index 534ce66bf7c4f..c49f60e831448 100644 --- a/FWCore/Utilities/test/test_catch2_OftenEmptyCString.cc +++ b/FWCore/Utilities/test/test_catch2_OftenEmptyCString.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Utilities/interface/OftenEmptyCString.h" #include diff --git a/FWCore/Utilities/test/test_catch2_atomic_value_ptr.cc b/FWCore/Utilities/test/test_catch2_atomic_value_ptr.cc index 3ce4185236a49..55b9a6f1f5ebb 100644 --- a/FWCore/Utilities/test/test_catch2_atomic_value_ptr.cc +++ b/FWCore/Utilities/test/test_catch2_atomic_value_ptr.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Utilities/interface/atomic_value_ptr.h" #include diff --git a/FWCore/Utilities/test/test_catch2_calculateCRC32.cc b/FWCore/Utilities/test/test_catch2_calculateCRC32.cc index 4ed662b508f4f..f000be0ed5c28 100644 --- a/FWCore/Utilities/test/test_catch2_calculateCRC32.cc +++ b/FWCore/Utilities/test/test_catch2_calculateCRC32.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Utilities/interface/calculateCRC32.h" TEST_CASE("test cms::calculateCRC32", "[calculateCRC32]") { diff --git a/FWCore/Utilities/test/test_catch2_callxnowait.cc b/FWCore/Utilities/test/test_catch2_callxnowait.cc index 76827a07e141e..e47e53ca6e41c 100644 --- a/FWCore/Utilities/test/test_catch2_callxnowait.cc +++ b/FWCore/Utilities/test/test_catch2_callxnowait.cc @@ -3,7 +3,7 @@ Test program for edm::TypeID class. ----------------------------------------------------------------------*/ #include -#include +#include #include "FWCore/Utilities/interface/CallOnceNoWait.h" #include "FWCore/Utilities/interface/CallNTimesNoWait.h" #include diff --git a/FWCore/Utilities/test/test_catch2_clone_ptr.cc b/FWCore/Utilities/test/test_catch2_clone_ptr.cc index 80b6c7fff5d09..c0d3bc058eabc 100644 --- a/FWCore/Utilities/test/test_catch2_clone_ptr.cc +++ b/FWCore/Utilities/test/test_catch2_clone_ptr.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Utilities/interface/clone_ptr.h" #include diff --git a/FWCore/Utilities/test/test_catch2_compactStringSerializer.cc b/FWCore/Utilities/test/test_catch2_compactStringSerializer.cc index ebe51424a9646..0106bed185547 100644 --- a/FWCore/Utilities/test/test_catch2_compactStringSerializer.cc +++ b/FWCore/Utilities/test/test_catch2_compactStringSerializer.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include #include diff --git a/FWCore/Utilities/test/test_catch2_esinputtag.cc b/FWCore/Utilities/test/test_catch2_esinputtag.cc index b63eed08a56cd..a453119a6a028 100644 --- a/FWCore/Utilities/test/test_catch2_esinputtag.cc +++ b/FWCore/Utilities/test/test_catch2_esinputtag.cc @@ -1,4 +1,4 @@ -#include +#include #include #include "FWCore/Utilities/interface/EDMException.h" diff --git a/FWCore/Utilities/test/test_catch2_friendlyname.cc b/FWCore/Utilities/test/test_catch2_friendlyname.cc index ecb75ce9323f9..5b00aa0b9b385 100644 --- a/FWCore/Utilities/test/test_catch2_friendlyname.cc +++ b/FWCore/Utilities/test/test_catch2_friendlyname.cc @@ -6,7 +6,7 @@ * */ -#include +#include #include #include "FWCore/Utilities/interface/FriendlyName.h" #include diff --git a/FWCore/Utilities/test/test_catch2_indexset.cc b/FWCore/Utilities/test/test_catch2_indexset.cc index 4d4f9c6d5356c..ff9b5b060e5c5 100644 --- a/FWCore/Utilities/test/test_catch2_indexset.cc +++ b/FWCore/Utilities/test/test_catch2_indexset.cc @@ -1,4 +1,4 @@ -#include +#include #include "FWCore/Utilities/interface/IndexSet.h" diff --git a/FWCore/Utilities/test/test_catch2_isFinite.cc b/FWCore/Utilities/test/test_catch2_isFinite.cc index ff1e3e127eb4b..ad9c5ee481ea9 100644 --- a/FWCore/Utilities/test/test_catch2_isFinite.cc +++ b/FWCore/Utilities/test/test_catch2_isFinite.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Utilities/interface/isFinite.h" diff --git a/FWCore/Utilities/test/test_catch2_main.cc b/FWCore/Utilities/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/FWCore/Utilities/test/test_catch2_main.cc +++ b/FWCore/Utilities/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/FWCore/Utilities/test/test_catch2_path_configuration.cc b/FWCore/Utilities/test/test_catch2_path_configuration.cc index 7dcbfeef9c9ed..b09bdce49aea5 100644 --- a/FWCore/Utilities/test/test_catch2_path_configuration.cc +++ b/FWCore/Utilities/test/test_catch2_path_configuration.cc @@ -1,5 +1,5 @@ #include "FWCore/Utilities/interface/path_configuration.h" -#include "catch.hpp" +#include "catch2/catch_all.hpp" using namespace edm::path_configuration; TEST_CASE("Test path_configuration", "[path_configuration]") { diff --git a/FWCore/Utilities/test/test_catch2_propagate_const.cc b/FWCore/Utilities/test/test_catch2_propagate_const.cc index d27577cef53c3..c11deb6033506 100644 --- a/FWCore/Utilities/test/test_catch2_propagate_const.cc +++ b/FWCore/Utilities/test/test_catch2_propagate_const.cc @@ -4,7 +4,7 @@ Test program for edm::propagate_const class. ----------------------------------------------------------------------*/ -#include +#include #include #include "FWCore/Utilities/interface/get_underlying_safe.h" #include "FWCore/Utilities/interface/propagate_const.h" diff --git a/FWCore/Utilities/test/test_catch2_propagate_const_array.cc b/FWCore/Utilities/test/test_catch2_propagate_const_array.cc index c2454f3655184..a1292dab96bb5 100644 --- a/FWCore/Utilities/test/test_catch2_propagate_const_array.cc +++ b/FWCore/Utilities/test/test_catch2_propagate_const_array.cc @@ -4,7 +4,7 @@ Test program for edm::propagate_const_array class. ----------------------------------------------------------------------*/ -#include +#include #include "FWCore/Utilities/interface/get_underlying_safe.h" #include "FWCore/Utilities/interface/propagate_const_array.h" diff --git a/FWCore/Utilities/test/test_catch2_reusableobjectholder.cc b/FWCore/Utilities/test/test_catch2_reusableobjectholder.cc index 8d5569f2b6920..c0aabf649eafa 100644 --- a/FWCore/Utilities/test/test_catch2_reusableobjectholder.cc +++ b/FWCore/Utilities/test/test_catch2_reusableobjectholder.cc @@ -1,4 +1,4 @@ -#include +#include #include #include #include diff --git a/FWCore/Utilities/test/test_catch2_signal.cc b/FWCore/Utilities/test/test_catch2_signal.cc index f8b4975b2f20c..b3d09fe5a9ca1 100644 --- a/FWCore/Utilities/test/test_catch2_signal.cc +++ b/FWCore/Utilities/test/test_catch2_signal.cc @@ -4,7 +4,7 @@ Test program for edm::signalslot::Signal class. ----------------------------------------------------------------------*/ -#include +#include #include #include #include diff --git a/FWCore/Utilities/test/test_catch2_soatuple.cc b/FWCore/Utilities/test/test_catch2_soatuple.cc index d34d10ff2503d..a40547b3a603e 100644 --- a/FWCore/Utilities/test/test_catch2_soatuple.cc +++ b/FWCore/Utilities/test/test_catch2_soatuple.cc @@ -5,7 +5,7 @@ Changed by Viji on 29-06-2005 ----------------------------------------------------------------------*/ -#include +#include #include #include #include diff --git a/FWCore/Utilities/test/test_catch2_stemFromPath.cc b/FWCore/Utilities/test/test_catch2_stemFromPath.cc index f815b7ba0515f..1a80145e24193 100644 --- a/FWCore/Utilities/test/test_catch2_stemFromPath.cc +++ b/FWCore/Utilities/test/test_catch2_stemFromPath.cc @@ -1,6 +1,6 @@ #include "FWCore/Utilities/interface/stemFromPath.h" -#include "catch.hpp" +#include "catch2/catch_all.hpp" TEST_CASE("Test stemFromPath", "[sources]") { CHECK(edm::stemFromPath("foo.root") == "foo"); diff --git a/FWCore/Utilities/test/test_catch2_transform.cc b/FWCore/Utilities/test/test_catch2_transform.cc index dfb4f984356e3..02cfdaab24768 100644 --- a/FWCore/Utilities/test/test_catch2_transform.cc +++ b/FWCore/Utilities/test/test_catch2_transform.cc @@ -8,7 +8,7 @@ Test program for edm::vector_transform class. #include #include #include -#include +#include #include "FWCore/Utilities/interface/transform.h" diff --git a/FWCore/Utilities/test/test_catch2_typeid.cc b/FWCore/Utilities/test/test_catch2_typeid.cc index 720a463971f27..9e4c923e768fd 100644 --- a/FWCore/Utilities/test/test_catch2_typeid.cc +++ b/FWCore/Utilities/test/test_catch2_typeid.cc @@ -8,7 +8,7 @@ Changed by Viji on 29-06-2005 #include #include #include -#include +#include #include "FWCore/Utilities/interface/TypeID.h" namespace edmtest { diff --git a/FWCore/Utilities/test/test_catch2_typeidbase.cc b/FWCore/Utilities/test/test_catch2_typeidbase.cc index 30ce11cb5c771..4b96d816cce71 100644 --- a/FWCore/Utilities/test/test_catch2_typeidbase.cc +++ b/FWCore/Utilities/test/test_catch2_typeidbase.cc @@ -8,7 +8,7 @@ Changed by Viji on 29-06-2005 #include #include #include -#include +#include #include "FWCore/Utilities/interface/TypeIDBase.h" namespace edmtest { diff --git a/FWCore/Utilities/test/test_catch2_value_ptr.cc b/FWCore/Utilities/test/test_catch2_value_ptr.cc index 02c96e79cbd70..ae41dcbe6a76a 100644 --- a/FWCore/Utilities/test/test_catch2_value_ptr.cc +++ b/FWCore/Utilities/test/test_catch2_value_ptr.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/Utilities/interface/value_ptr.h" #include diff --git a/FWCore/Utilities/test/test_catch2_vecarray.cc b/FWCore/Utilities/test/test_catch2_vecarray.cc index 9e31775889bae..0b27b3e1ce3ae 100644 --- a/FWCore/Utilities/test/test_catch2_vecarray.cc +++ b/FWCore/Utilities/test/test_catch2_vecarray.cc @@ -1,4 +1,4 @@ -#include +#include #include "FWCore/Utilities/interface/VecArray.h" diff --git a/GeneratorInterface/LHEInterface/test/test_catch2_ExternalLHEProducer.cc b/GeneratorInterface/LHEInterface/test/test_catch2_ExternalLHEProducer.cc index afab63550aed3..b3ab885e31a84 100644 --- a/GeneratorInterface/LHEInterface/test/test_catch2_ExternalLHEProducer.cc +++ b/GeneratorInterface/LHEInterface/test/test_catch2_ExternalLHEProducer.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/TestProcessor/interface/TestProcessor.h" #include "FWCore/Utilities/interface/Exception.h" #include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h" diff --git a/GeneratorInterface/LHEInterface/test/test_catch2_main.cc b/GeneratorInterface/LHEInterface/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/GeneratorInterface/LHEInterface/test/test_catch2_main.cc +++ b/GeneratorInterface/LHEInterface/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/GeneratorInterface/Pythia8Interface/test/test_catch2_External_Pythia8GeneratorFilter.cc b/GeneratorInterface/Pythia8Interface/test/test_catch2_External_Pythia8GeneratorFilter.cc index af92c47204d71..87d11ddf49188 100644 --- a/GeneratorInterface/Pythia8Interface/test/test_catch2_External_Pythia8GeneratorFilter.cc +++ b/GeneratorInterface/Pythia8Interface/test/test_catch2_External_Pythia8GeneratorFilter.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/TestProcessor/interface/TestProcessor.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/GeneratorInterface/Pythia8Interface/test/test_catch2_Pythia8GeneratorFilter.cc b/GeneratorInterface/Pythia8Interface/test/test_catch2_Pythia8GeneratorFilter.cc index 5401e08174520..704fb6c051b4f 100644 --- a/GeneratorInterface/Pythia8Interface/test/test_catch2_Pythia8GeneratorFilter.cc +++ b/GeneratorInterface/Pythia8Interface/test/test_catch2_Pythia8GeneratorFilter.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/TestProcessor/interface/TestProcessor.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/GeneratorInterface/Pythia8Interface/test/test_catch2_main.cc b/GeneratorInterface/Pythia8Interface/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/GeneratorInterface/Pythia8Interface/test/test_catch2_main.cc +++ b/GeneratorInterface/Pythia8Interface/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/Geometry/CaloGeometry/test/calocellgeometryptr_catch2.cc b/Geometry/CaloGeometry/test/calocellgeometryptr_catch2.cc index 158fefff78f53..a1f4104287d4f 100644 --- a/Geometry/CaloGeometry/test/calocellgeometryptr_catch2.cc +++ b/Geometry/CaloGeometry/test/calocellgeometryptr_catch2.cc @@ -16,7 +16,7 @@ #include "Geometry/CaloGeometry/interface/CaloCellGeometryPtr.h" #include "Geometry/CaloGeometry/interface/CaloCellGeometryMayOwnPtr.h" #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" namespace { class DummyCell : public CaloCellGeometry { diff --git a/HLTrigger/HLTcore/test/test_catch2_HLTConfigData.cc b/HLTrigger/HLTcore/test/test_catch2_HLTConfigData.cc index 3abdd501318f1..9b801a9db8e9f 100644 --- a/HLTrigger/HLTcore/test/test_catch2_HLTConfigData.cc +++ b/HLTrigger/HLTcore/test/test_catch2_HLTConfigData.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "HLTrigger/HLTcore/interface/HLTConfigData.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" diff --git a/HLTrigger/HLTcore/test/test_catch2_TriggerExpressionParser.cc b/HLTrigger/HLTcore/test/test_catch2_TriggerExpressionParser.cc index c1d1b9ae2b76f..ae5827ba2dff5 100644 --- a/HLTrigger/HLTcore/test/test_catch2_TriggerExpressionParser.cc +++ b/HLTrigger/HLTcore/test/test_catch2_TriggerExpressionParser.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include diff --git a/HeterogeneousCore/AlpakaCore/test/alpaka/testFriendlyClassNames.cc b/HeterogeneousCore/AlpakaCore/test/alpaka/testFriendlyClassNames.cc index 395aadf3c7f0a..a1f5965d12177 100644 --- a/HeterogeneousCore/AlpakaCore/test/alpaka/testFriendlyClassNames.cc +++ b/HeterogeneousCore/AlpakaCore/test/alpaka/testFriendlyClassNames.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/HeterogeneousCore/AlpakaInterface/test/alpaka/testAtomicPairCounter.dev.cc b/HeterogeneousCore/AlpakaInterface/test/alpaka/testAtomicPairCounter.dev.cc index a5403c313abb9..dd35ff55b458c 100644 --- a/HeterogeneousCore/AlpakaInterface/test/alpaka/testAtomicPairCounter.dev.cc +++ b/HeterogeneousCore/AlpakaInterface/test/alpaka/testAtomicPairCounter.dev.cc @@ -2,7 +2,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/HeterogeneousCore/AlpakaInterface/test/alpaka/testBuffer.dev.cc b/HeterogeneousCore/AlpakaInterface/test/alpaka/testBuffer.dev.cc index 19fa329e65eed..d572bc8f07552 100644 --- a/HeterogeneousCore/AlpakaInterface/test/alpaka/testBuffer.dev.cc +++ b/HeterogeneousCore/AlpakaInterface/test/alpaka/testBuffer.dev.cc @@ -1,7 +1,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "FWCore/Utilities/interface/stringize.h" #include "HeterogeneousCore/AlpakaInterface/interface/config.h" diff --git a/HeterogeneousCore/AlpakaInterface/test/alpaka/testCopyBufferToDevice.dev.cc b/HeterogeneousCore/AlpakaInterface/test/alpaka/testCopyBufferToDevice.dev.cc index b4bbb2868412e..b382b2741a59a 100644 --- a/HeterogeneousCore/AlpakaInterface/test/alpaka/testCopyBufferToDevice.dev.cc +++ b/HeterogeneousCore/AlpakaInterface/test/alpaka/testCopyBufferToDevice.dev.cc @@ -1,7 +1,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "HeterogeneousCore/AlpakaInterface/interface/config.h" #include "HeterogeneousCore/AlpakaInterface/interface/memory.h" diff --git a/HeterogeneousCore/AlpakaInterface/test/alpaka/testHistoContainer.dev.cc b/HeterogeneousCore/AlpakaInterface/test/alpaka/testHistoContainer.dev.cc index b49b6013fa901..86937dba4b147 100644 --- a/HeterogeneousCore/AlpakaInterface/test/alpaka/testHistoContainer.dev.cc +++ b/HeterogeneousCore/AlpakaInterface/test/alpaka/testHistoContainer.dev.cc @@ -5,7 +5,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/HeterogeneousCore/AlpakaInterface/test/alpaka/testIndependentKernel.dev.cc b/HeterogeneousCore/AlpakaInterface/test/alpaka/testIndependentKernel.dev.cc index ec78260895673..cb048708105a6 100644 --- a/HeterogeneousCore/AlpakaInterface/test/alpaka/testIndependentKernel.dev.cc +++ b/HeterogeneousCore/AlpakaInterface/test/alpaka/testIndependentKernel.dev.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "FWCore/Utilities/interface/stringize.h" #include "HeterogeneousCore/AlpakaInterface/interface/config.h" diff --git a/HeterogeneousCore/AlpakaInterface/test/alpaka/testKernel.dev.cc b/HeterogeneousCore/AlpakaInterface/test/alpaka/testKernel.dev.cc index 5dd8891db48e2..eea9df5dabe91 100644 --- a/HeterogeneousCore/AlpakaInterface/test/alpaka/testKernel.dev.cc +++ b/HeterogeneousCore/AlpakaInterface/test/alpaka/testKernel.dev.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "FWCore/Utilities/interface/stringize.h" #include "HeterogeneousCore/AlpakaInterface/interface/config.h" diff --git a/HeterogeneousCore/AlpakaInterface/test/alpaka/testMoveToDeviceAsync.dev.cc b/HeterogeneousCore/AlpakaInterface/test/alpaka/testMoveToDeviceAsync.dev.cc index 1e3b7f80b318f..89657885b21cc 100644 --- a/HeterogeneousCore/AlpakaInterface/test/alpaka/testMoveToDeviceAsync.dev.cc +++ b/HeterogeneousCore/AlpakaInterface/test/alpaka/testMoveToDeviceAsync.dev.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "HeterogeneousCore/AlpakaInterface/interface/config.h" #include "HeterogeneousCore/AlpakaInterface/interface/CopyToDevice.h" diff --git a/HeterogeneousCore/AlpakaInterface/test/alpaka/testVec.cc b/HeterogeneousCore/AlpakaInterface/test/alpaka/testVec.cc index ed7b29824431b..65bb2b5931033 100644 --- a/HeterogeneousCore/AlpakaInterface/test/alpaka/testVec.cc +++ b/HeterogeneousCore/AlpakaInterface/test/alpaka/testVec.cc @@ -1,7 +1,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "HeterogeneousCore/AlpakaInterface/interface/config.h" diff --git a/HeterogeneousCore/AlpakaInterface/test/testBackend.cc b/HeterogeneousCore/AlpakaInterface/test/testBackend.cc index 1d4921dfdb33f..03f9d5a7ee94a 100644 --- a/HeterogeneousCore/AlpakaInterface/test/testBackend.cc +++ b/HeterogeneousCore/AlpakaInterface/test/testBackend.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include +#include #include "HeterogeneousCore/AlpakaInterface/interface/Backend.h" @@ -12,7 +12,8 @@ TEST_CASE("Test cms::alpakatools::toBackend", "cms::alpakatools::Backend") { } SECTION("Invalid string") { REQUIRE_THROWS_WITH(cms::alpakatools::toBackend("Nonexistent"), - Catch::Contains("EnumNotFound") and Catch::Contains("Invalid backend name")); + Catch::Matchers::ContainsSubstring("EnumNotFound") and + Catch::Matchers::ContainsSubstring("Invalid backend name")); } } @@ -25,6 +26,7 @@ TEST_CASE("Test cms::alpakatools::toString", "cms::alpakatools::Backend") { } SECTION("Invalid enum") { REQUIRE_THROWS_WITH(cms::alpakatools::toString(cms::alpakatools::Backend::size), - Catch::Contains("InvalidEnumValue") and Catch::Contains("Invalid backend enum value")); + Catch::Matchers::ContainsSubstring("InvalidEnumValue") and + Catch::Matchers::ContainsSubstring("Invalid backend enum value")); } } diff --git a/HeterogeneousCore/AlpakaMath/test/alpaka/testDeltaPhi.dev.cc b/HeterogeneousCore/AlpakaMath/test/alpaka/testDeltaPhi.dev.cc index 021e1d9850d7b..0b0f2805518c9 100644 --- a/HeterogeneousCore/AlpakaMath/test/alpaka/testDeltaPhi.dev.cc +++ b/HeterogeneousCore/AlpakaMath/test/alpaka/testDeltaPhi.dev.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include +#include #include #include diff --git a/HeterogeneousCore/CUDACore/test/test_ScopedContext.cc b/HeterogeneousCore/CUDACore/test/test_ScopedContext.cc index f8e6e9779d83e..f2a514e3a7d48 100644 --- a/HeterogeneousCore/CUDACore/test/test_ScopedContext.cc +++ b/HeterogeneousCore/CUDACore/test/test_ScopedContext.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "CUDADataFormats/Common/interface/Product.h" #include "FWCore/Concurrency/interface/FinalWaitingTask.h" diff --git a/HeterogeneousCore/CUDACore/test/test_main.cc b/HeterogeneousCore/CUDACore/test/test_main.cc index 85e19019bc738..f817af48040a2 100644 --- a/HeterogeneousCore/CUDACore/test/test_main.cc +++ b/HeterogeneousCore/CUDACore/test/test_main.cc @@ -1,14 +1,14 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/ParameterSetReader/interface/ParameterSetReader.h" #include "FWCore/PluginManager/interface/PluginManager.h" #include "FWCore/PluginManager/interface/standard.h" #include "FWCore/ServiceRegistry/interface/ServiceRegistry.h" -class ServiceRegistryListener : public Catch::TestEventListenerBase { +class ServiceRegistryListener : public Catch::EventListenerBase { public: - using Catch::TestEventListenerBase::TestEventListenerBase; // inherit constructor + using Catch::EventListenerBase::EventListenerBase; // inherit constructor void testRunStarting(Catch::TestRunInfo const& testRunInfo) override { edmplugin::PluginManager::configure(edmplugin::standard::config()); diff --git a/HeterogeneousCore/CUDAServices/test/testCUDAService.cpp b/HeterogeneousCore/CUDAServices/test/testCUDAService.cpp index eb05c7bf2ebbc..8c1d20280cb30 100644 --- a/HeterogeneousCore/CUDAServices/test/testCUDAService.cpp +++ b/HeterogeneousCore/CUDAServices/test/testCUDAService.cpp @@ -8,7 +8,7 @@ #include -#include +#include #include "FWCore/AbstractServices/interface/ResourceInformation.h" #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" diff --git a/HeterogeneousCore/CUDAServices/test/test_main.cpp b/HeterogeneousCore/CUDAServices/test/test_main.cpp index 417b2599ee8c5..5fec1596ac358 100644 --- a/HeterogeneousCore/CUDAServices/test/test_main.cpp +++ b/HeterogeneousCore/CUDAServices/test/test_main.cpp @@ -1,12 +1,12 @@ #define CATCH_CONFIG_MAIN -#include +#include #include "FWCore/PluginManager/interface/PluginManager.h" #include "FWCore/PluginManager/interface/standard.h" -class ServiceRegistryListener : public Catch::TestEventListenerBase { +class ServiceRegistryListener : public Catch::EventListenerBase { public: - using Catch::TestEventListenerBase::TestEventListenerBase; // inherit constructor + using Catch::EventListenerBase::EventListenerBase; // inherit constructor void testRunStarting(Catch::TestRunInfo const& testRunInfo) override { edmplugin::PluginManager::configure(edmplugin::standard::config()); diff --git a/HeterogeneousCore/CUDATest/test/test_TestCUDAProducerGPUFirst.cc b/HeterogeneousCore/CUDATest/test/test_TestCUDAProducerGPUFirst.cc index 47ebbd97c5286..75f9c438979c6 100644 --- a/HeterogeneousCore/CUDATest/test/test_TestCUDAProducerGPUFirst.cc +++ b/HeterogeneousCore/CUDATest/test/test_TestCUDAProducerGPUFirst.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/TestProcessor/interface/TestProcessor.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/HeterogeneousCore/CUDATest/test/test_main.cc b/HeterogeneousCore/CUDATest/test/test_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/HeterogeneousCore/CUDATest/test/test_main.cc +++ b/HeterogeneousCore/CUDATest/test/test_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/HeterogeneousCore/CUDAUtilities/test/copyAsync_t.cpp b/HeterogeneousCore/CUDAUtilities/test/copyAsync_t.cpp index 24a114db68ce1..07a8490311776 100644 --- a/HeterogeneousCore/CUDAUtilities/test/copyAsync_t.cpp +++ b/HeterogeneousCore/CUDAUtilities/test/copyAsync_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "HeterogeneousCore/CUDAUtilities/interface/device_unique_ptr.h" #include "HeterogeneousCore/CUDAUtilities/interface/host_unique_ptr.h" diff --git a/HeterogeneousCore/CUDAUtilities/test/device_unique_ptr_t.cpp b/HeterogeneousCore/CUDAUtilities/test/device_unique_ptr_t.cpp index 4c8412f2cecc2..0252f9459fff7 100644 --- a/HeterogeneousCore/CUDAUtilities/test/device_unique_ptr_t.cpp +++ b/HeterogeneousCore/CUDAUtilities/test/device_unique_ptr_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h" #include "HeterogeneousCore/CUDAUtilities/interface/device_unique_ptr.h" diff --git a/HeterogeneousCore/CUDAUtilities/test/host_noncached_unique_ptr_t.cpp b/HeterogeneousCore/CUDAUtilities/test/host_noncached_unique_ptr_t.cpp index 62dcaaf1eba9e..97e954011bd96 100644 --- a/HeterogeneousCore/CUDAUtilities/test/host_noncached_unique_ptr_t.cpp +++ b/HeterogeneousCore/CUDAUtilities/test/host_noncached_unique_ptr_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "HeterogeneousCore/CUDAUtilities/interface/host_noncached_unique_ptr.h" #include "HeterogeneousCore/CUDAUtilities/interface/requireDevices.h" diff --git a/HeterogeneousCore/CUDAUtilities/test/host_unique_ptr_t.cpp b/HeterogeneousCore/CUDAUtilities/test/host_unique_ptr_t.cpp index 8ab2bca86106b..e445963d239dd 100644 --- a/HeterogeneousCore/CUDAUtilities/test/host_unique_ptr_t.cpp +++ b/HeterogeneousCore/CUDAUtilities/test/host_unique_ptr_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h" #include "HeterogeneousCore/CUDAUtilities/interface/host_unique_ptr.h" diff --git a/HeterogeneousCore/CUDAUtilities/test/memsetAsync_t.cpp b/HeterogeneousCore/CUDAUtilities/test/memsetAsync_t.cpp index 1afa1e5806ff6..885bc6d594e93 100644 --- a/HeterogeneousCore/CUDAUtilities/test/memsetAsync_t.cpp +++ b/HeterogeneousCore/CUDAUtilities/test/memsetAsync_t.cpp @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "HeterogeneousCore/CUDAUtilities/interface/device_unique_ptr.h" #include "HeterogeneousCore/CUDAUtilities/interface/host_unique_ptr.h" diff --git a/HeterogeneousCore/CUDAUtilities/test/testCatch2Main.cpp b/HeterogeneousCore/CUDAUtilities/test/testCatch2Main.cpp index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/HeterogeneousCore/CUDAUtilities/test/testCatch2Main.cpp +++ b/HeterogeneousCore/CUDAUtilities/test/testCatch2Main.cpp @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/HeterogeneousCore/CUDAUtilities/test/testCudaCheck.cpp b/HeterogeneousCore/CUDAUtilities/test/testCudaCheck.cpp index c812cd06904ef..6aa77ce447b2e 100644 --- a/HeterogeneousCore/CUDAUtilities/test/testCudaCheck.cpp +++ b/HeterogeneousCore/CUDAUtilities/test/testCudaCheck.cpp @@ -1,6 +1,6 @@ // Catch2 headers #define CATCH_CONFIG_MAIN -#include +#include // CUDA headers #include diff --git a/HeterogeneousCore/CUDAUtilities/test/testRequireCUDADevices.cpp b/HeterogeneousCore/CUDAUtilities/test/testRequireCUDADevices.cpp index d513de0591447..6a35ee989d5e7 100644 --- a/HeterogeneousCore/CUDAUtilities/test/testRequireCUDADevices.cpp +++ b/HeterogeneousCore/CUDAUtilities/test/testRequireCUDADevices.cpp @@ -1,6 +1,6 @@ // Catch2 headers #define CATCH_CONFIG_MAIN -#include +#include // CUDA headers #include diff --git a/HeterogeneousCore/ROCmServices/test/testROCmService.cpp b/HeterogeneousCore/ROCmServices/test/testROCmService.cpp index 36f1281b835e5..1f0c1b36124c2 100644 --- a/HeterogeneousCore/ROCmServices/test/testROCmService.cpp +++ b/HeterogeneousCore/ROCmServices/test/testROCmService.cpp @@ -8,7 +8,7 @@ #include -#include +#include #include "FWCore/AbstractServices/interface/ResourceInformation.h" #include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" diff --git a/HeterogeneousCore/ROCmServices/test/test_main.cpp b/HeterogeneousCore/ROCmServices/test/test_main.cpp index 417b2599ee8c5..5fec1596ac358 100644 --- a/HeterogeneousCore/ROCmServices/test/test_main.cpp +++ b/HeterogeneousCore/ROCmServices/test/test_main.cpp @@ -1,12 +1,12 @@ #define CATCH_CONFIG_MAIN -#include +#include #include "FWCore/PluginManager/interface/PluginManager.h" #include "FWCore/PluginManager/interface/standard.h" -class ServiceRegistryListener : public Catch::TestEventListenerBase { +class ServiceRegistryListener : public Catch::EventListenerBase { public: - using Catch::TestEventListenerBase::TestEventListenerBase; // inherit constructor + using Catch::EventListenerBase::EventListenerBase; // inherit constructor void testRunStarting(Catch::TestRunInfo const& testRunInfo) override { edmplugin::PluginManager::configure(edmplugin::standard::config()); diff --git a/HeterogeneousCore/ROCmUtilities/test/testHipCheck.cpp b/HeterogeneousCore/ROCmUtilities/test/testHipCheck.cpp index b08d5213d07ef..0c7ba007be505 100644 --- a/HeterogeneousCore/ROCmUtilities/test/testHipCheck.cpp +++ b/HeterogeneousCore/ROCmUtilities/test/testHipCheck.cpp @@ -1,6 +1,6 @@ // Catch2 headers #define CATCH_CONFIG_MAIN -#include +#include // ROCm headers #include diff --git a/HeterogeneousCore/ROCmUtilities/test/testRequireROCmDevices.cpp b/HeterogeneousCore/ROCmUtilities/test/testRequireROCmDevices.cpp index edc2eff9672ea..9516aab8c56ca 100644 --- a/HeterogeneousCore/ROCmUtilities/test/testRequireROCmDevices.cpp +++ b/HeterogeneousCore/ROCmUtilities/test/testRequireROCmDevices.cpp @@ -1,6 +1,6 @@ // Catch2 headers #define CATCH_CONFIG_MAIN -#include +#include // ROCm headers #include diff --git a/HeterogeneousTest/AlpakaDevice/test/alpaka/testDeviceAddition.dev.cc b/HeterogeneousTest/AlpakaDevice/test/alpaka/testDeviceAddition.dev.cc index 7e017b9ea0bc9..9d365813cbdea 100644 --- a/HeterogeneousTest/AlpakaDevice/test/alpaka/testDeviceAddition.dev.cc +++ b/HeterogeneousTest/AlpakaDevice/test/alpaka/testDeviceAddition.dev.cc @@ -3,7 +3,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/HeterogeneousTest/AlpakaKernel/test/alpaka/testDeviceAdditionKernel.dev.cc b/HeterogeneousTest/AlpakaKernel/test/alpaka/testDeviceAdditionKernel.dev.cc index 814d632b2dfba..710cf8260bca2 100644 --- a/HeterogeneousTest/AlpakaKernel/test/alpaka/testDeviceAdditionKernel.dev.cc +++ b/HeterogeneousTest/AlpakaKernel/test/alpaka/testDeviceAdditionKernel.dev.cc @@ -3,7 +3,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/HeterogeneousTest/AlpakaOpaque/test/alpaka/testDeviceAdditionOpaque.cc b/HeterogeneousTest/AlpakaOpaque/test/alpaka/testDeviceAdditionOpaque.cc index aba728bd26218..1081cf5f9ecea 100644 --- a/HeterogeneousTest/AlpakaOpaque/test/alpaka/testDeviceAdditionOpaque.cc +++ b/HeterogeneousTest/AlpakaOpaque/test/alpaka/testDeviceAdditionOpaque.cc @@ -3,7 +3,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "HeterogeneousCore/AlpakaInterface/interface/config.h" #include "HeterogeneousCore/AlpakaInterface/interface/devices.h" diff --git a/HeterogeneousTest/AlpakaWrapper/test/alpaka/testDeviceAdditionWrapper.cc b/HeterogeneousTest/AlpakaWrapper/test/alpaka/testDeviceAdditionWrapper.cc index 00e2776f64948..5c458c5747e52 100644 --- a/HeterogeneousTest/AlpakaWrapper/test/alpaka/testDeviceAdditionWrapper.cc +++ b/HeterogeneousTest/AlpakaWrapper/test/alpaka/testDeviceAdditionWrapper.cc @@ -3,7 +3,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/HeterogeneousTest/CUDADevice/test/testDeviceAddition.cu b/HeterogeneousTest/CUDADevice/test/testDeviceAddition.cu index aadafaba38ea7..c380b3580afa9 100644 --- a/HeterogeneousTest/CUDADevice/test/testDeviceAddition.cu +++ b/HeterogeneousTest/CUDADevice/test/testDeviceAddition.cu @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/HeterogeneousTest/CUDAKernel/test/testDeviceAdditionKernel.cu b/HeterogeneousTest/CUDAKernel/test/testDeviceAdditionKernel.cu index 25e003eb86276..c03a8abeefd93 100644 --- a/HeterogeneousTest/CUDAKernel/test/testDeviceAdditionKernel.cu +++ b/HeterogeneousTest/CUDAKernel/test/testDeviceAdditionKernel.cu @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/HeterogeneousTest/CUDAOpaque/test/testDeviceAdditionOpaque.cc b/HeterogeneousTest/CUDAOpaque/test/testDeviceAdditionOpaque.cc index d52945871b99e..4ec6d112c44cb 100644 --- a/HeterogeneousTest/CUDAOpaque/test/testDeviceAdditionOpaque.cc +++ b/HeterogeneousTest/CUDAOpaque/test/testDeviceAdditionOpaque.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "HeterogeneousCore/CUDAUtilities/interface/requireDevices.h" #include "HeterogeneousTest/CUDAOpaque/interface/DeviceAdditionOpaque.h" diff --git a/HeterogeneousTest/CUDAWrapper/test/testDeviceAdditionWrapper.cc b/HeterogeneousTest/CUDAWrapper/test/testDeviceAdditionWrapper.cc index 82404ab2407d0..5d05a66dc2dce 100644 --- a/HeterogeneousTest/CUDAWrapper/test/testDeviceAdditionWrapper.cc +++ b/HeterogeneousTest/CUDAWrapper/test/testDeviceAdditionWrapper.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/HeterogeneousTest/ROCmDevice/test/testDeviceAddition.hip.cc b/HeterogeneousTest/ROCmDevice/test/testDeviceAddition.hip.cc index 87bce95ecea5c..5b730e5ceadb1 100644 --- a/HeterogeneousTest/ROCmDevice/test/testDeviceAddition.hip.cc +++ b/HeterogeneousTest/ROCmDevice/test/testDeviceAddition.hip.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/HeterogeneousTest/ROCmKernel/test/testDeviceAdditionKernel.hip.cc b/HeterogeneousTest/ROCmKernel/test/testDeviceAdditionKernel.hip.cc index a31ff6d61d5f4..32a2cb6746798 100644 --- a/HeterogeneousTest/ROCmKernel/test/testDeviceAdditionKernel.hip.cc +++ b/HeterogeneousTest/ROCmKernel/test/testDeviceAdditionKernel.hip.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/HeterogeneousTest/ROCmOpaque/test/testDeviceAdditionOpaque.cc b/HeterogeneousTest/ROCmOpaque/test/testDeviceAdditionOpaque.cc index cf08bb9d74447..9fa159ce43ac5 100644 --- a/HeterogeneousTest/ROCmOpaque/test/testDeviceAdditionOpaque.cc +++ b/HeterogeneousTest/ROCmOpaque/test/testDeviceAdditionOpaque.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include "HeterogeneousTest/ROCmOpaque/interface/DeviceAdditionOpaque.h" #include "HeterogeneousCore/ROCmUtilities/interface/requireDevices.h" diff --git a/HeterogeneousTest/ROCmWrapper/test/testDeviceAdditionWrapper.cc b/HeterogeneousTest/ROCmWrapper/test/testDeviceAdditionWrapper.cc index b34cd285b7373..be54b9881a82b 100644 --- a/HeterogeneousTest/ROCmWrapper/test/testDeviceAdditionWrapper.cc +++ b/HeterogeneousTest/ROCmWrapper/test/testDeviceAdditionWrapper.cc @@ -4,7 +4,7 @@ #include #define CATCH_CONFIG_MAIN -#include +#include #include diff --git a/IOPool/Common/test/test_catch2_main.cc b/IOPool/Common/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/IOPool/Common/test/test_catch2_main.cc +++ b/IOPool/Common/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/IOPool/Common/test/test_catch2_output2input.cc b/IOPool/Common/test/test_catch2_output2input.cc index 8dd8679d9b4ca..4f379339b2fed 100644 --- a/IOPool/Common/test/test_catch2_output2input.cc +++ b/IOPool/Common/test/test_catch2_output2input.cc @@ -5,7 +5,7 @@ #include "DataFormats/TestObjects/interface/Thing.h" #include #include -#include "catch.hpp" +#include "catch2/catch_all.hpp" static constexpr auto s_tag = "[PoolOutputSource]"; diff --git a/L1Trigger/GlobalMuonTrigger/test/test_L1MuGMTMatrix.cc b/L1Trigger/GlobalMuonTrigger/test/test_L1MuGMTMatrix.cc index 7368e664c04ab..3329a0ef477db 100644 --- a/L1Trigger/GlobalMuonTrigger/test/test_L1MuGMTMatrix.cc +++ b/L1Trigger/GlobalMuonTrigger/test/test_L1MuGMTMatrix.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTMatrix.h" diff --git a/PerfTools/AllocMonitor/test/test_catch2_AllocMonitorRegistry.cc b/PerfTools/AllocMonitor/test/test_catch2_AllocMonitorRegistry.cc index 8d5e5ea6f4cbb..848fab8aafe3f 100644 --- a/PerfTools/AllocMonitor/test/test_catch2_AllocMonitorRegistry.cc +++ b/PerfTools/AllocMonitor/test/test_catch2_AllocMonitorRegistry.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "PerfTools/AllocMonitor/interface/AllocMonitorRegistry.h" diff --git a/PerfTools/AllocMonitor/test/test_catch2_allocmap.cc b/PerfTools/AllocMonitor/test/test_catch2_allocmap.cc index cec2b237e07c2..91c1cbe0e4b77 100644 --- a/PerfTools/AllocMonitor/test/test_catch2_allocmap.cc +++ b/PerfTools/AllocMonitor/test/test_catch2_allocmap.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "PerfTools/AllocMonitor/plugins/mea_AllocMap.h" diff --git a/PhysicsTools/NanoAOD/test/test_catch2_NanoAODDQM.cc b/PhysicsTools/NanoAOD/test/test_catch2_NanoAODDQM.cc index 034ff395e1006..22d10862b48f3 100644 --- a/PhysicsTools/NanoAOD/test/test_catch2_NanoAODDQM.cc +++ b/PhysicsTools/NanoAOD/test/test_catch2_NanoAODDQM.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/TestProcessor/interface/TestProcessor.h" #include "FWCore/Utilities/interface/Exception.h" #include "DataFormats/NanoAOD/interface/FlatTable.h" diff --git a/PhysicsTools/NanoAOD/test/test_catch2_main.cc b/PhysicsTools/NanoAOD/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/PhysicsTools/NanoAOD/test/test_catch2_main.cc +++ b/PhysicsTools/NanoAOD/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/RecoEgamma/PhotonIdentification/test/test_PhotonMvaXgb.cc b/RecoEgamma/PhotonIdentification/test/test_PhotonMvaXgb.cc index 9a712374815f5..eab331a8b3565 100644 --- a/RecoEgamma/PhotonIdentification/test/test_PhotonMvaXgb.cc +++ b/RecoEgamma/PhotonIdentification/test/test_PhotonMvaXgb.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include +#include #include "FWCore/ParameterSet/interface/FileInPath.h" diff --git a/RecoLocalCalo/HGCalRecProducers/test/EtaPhiSearchInTile_t.cpp b/RecoLocalCalo/HGCalRecProducers/test/EtaPhiSearchInTile_t.cpp index a528f2a4c0d23..c132d4da381e0 100644 --- a/RecoLocalCalo/HGCalRecProducers/test/EtaPhiSearchInTile_t.cpp +++ b/RecoLocalCalo/HGCalRecProducers/test/EtaPhiSearchInTile_t.cpp @@ -5,7 +5,7 @@ #include "RecoLocalCalo/HGCalRecProducers/interface/HGCalLayerTiles.h" #define CATCH_CONFIG_MAIN -#include +#include int countEntries(const HGCalScintillatorLayerTiles &t, const std::array &limits) { int entries = 0; diff --git a/RecoParticleFlow/PFTracking/test/test_catch2_PFDisplacedVertexProducer.cc b/RecoParticleFlow/PFTracking/test/test_catch2_PFDisplacedVertexProducer.cc index f4666aecc1361..01ed635c15e92 100644 --- a/RecoParticleFlow/PFTracking/test/test_catch2_PFDisplacedVertexProducer.cc +++ b/RecoParticleFlow/PFTracking/test/test_catch2_PFDisplacedVertexProducer.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "FWCore/TestProcessor/interface/TestProcessor.h" #include "FWCore/Utilities/interface/Exception.h" #include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertexFwd.h" diff --git a/RecoParticleFlow/PFTracking/test/test_catch2_main.cc b/RecoParticleFlow/PFTracking/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/RecoParticleFlow/PFTracking/test/test_catch2_main.cc +++ b/RecoParticleFlow/PFTracking/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/RecoTracker/PixelTrackFitting/test/RZLine_catch2.cc b/RecoTracker/PixelTrackFitting/test/RZLine_catch2.cc index 10c3cd8b3279b..a381ef5ed6d07 100644 --- a/RecoTracker/PixelTrackFitting/test/RZLine_catch2.cc +++ b/RecoTracker/PixelTrackFitting/test/RZLine_catch2.cc @@ -1,5 +1,5 @@ #define CATCH_CONFIG_MAIN -#include +#include #include #include "RecoTracker/PixelTrackFitting/interface/RZLine.h" @@ -19,11 +19,11 @@ TEST_CASE("test RZLine", "[RZLine]") { SECTION("array") { RZLine l(r, z, errz); - REQUIRE(l.cotTheta() == Approx(cotTheta)); - REQUIRE(l.intercept() == Approx(intercept)); - REQUIRE(l.covss() == Approx(covss)); - REQUIRE(l.covii() == Approx(covii)); - REQUIRE(l.covsi() == Approx(covsi)); + REQUIRE_THAT(l.cotTheta(), Catch::Matchers::WithinRel(cotTheta)); + REQUIRE_THAT(l.intercept(), Catch::Matchers::WithinRel(intercept)); + REQUIRE_THAT(l.covss(), Catch::Matchers::WithinRel(covss)); + REQUIRE_THAT(l.covii(), Catch::Matchers::WithinRel(covii)); + REQUIRE_THAT(l.covsi(), Catch::Matchers::WithinRel(covsi)); REQUIRE_THAT(l.chi2(), Catch::Matchers::WithinAbs(chi2, chi2_diff)); } @@ -33,11 +33,11 @@ TEST_CASE("test RZLine", "[RZLine]") { const std::vector errzv{errz.begin(), errz.end()}; RZLine l(rv, zv, errzv); - REQUIRE(l.cotTheta() == Approx(cotTheta)); - REQUIRE(l.intercept() == Approx(intercept)); - REQUIRE(l.covss() == Approx(covss)); - REQUIRE(l.covii() == Approx(covii)); - REQUIRE(l.covsi() == Approx(covsi)); + REQUIRE_THAT(l.cotTheta(), Catch::Matchers::WithinRel(cotTheta)); + REQUIRE_THAT(l.intercept(), Catch::Matchers::WithinRel(intercept)); + REQUIRE_THAT(l.covss(), Catch::Matchers::WithinRel(covss)); + REQUIRE_THAT(l.covii(), Catch::Matchers::WithinRel(covii)); + REQUIRE_THAT(l.covsi(), Catch::Matchers::WithinRel(covsi)); REQUIRE_THAT(l.chi2(), Catch::Matchers::WithinAbs(chi2, chi2_diff)); } @@ -48,11 +48,11 @@ TEST_CASE("test RZLine", "[RZLine]") { std::transform(errz.begin(), errz.end(), std::back_inserter(errzv), [](float v) { return v * v; }); RZLine l(rv, zv, errzv, RZLine::ErrZ2_tag()); - REQUIRE(l.cotTheta() == Approx(cotTheta)); - REQUIRE(l.intercept() == Approx(intercept)); - REQUIRE(l.covss() == Approx(covss)); - REQUIRE(l.covii() == Approx(covii)); - REQUIRE(l.covsi() == Approx(covsi)); + REQUIRE_THAT(l.cotTheta(), Catch::Matchers::WithinRel(cotTheta)); + REQUIRE_THAT(l.intercept(), Catch::Matchers::WithinRel(intercept)); + REQUIRE_THAT(l.covss(), Catch::Matchers::WithinRel(covss)); + REQUIRE_THAT(l.covii(), Catch::Matchers::WithinRel(covii)); + REQUIRE_THAT(l.covsi(), Catch::Matchers::WithinRel(covsi)); REQUIRE_THAT(l.chi2(), Catch::Matchers::WithinAbs(chi2, chi2_diff)); } @@ -73,11 +73,11 @@ TEST_CASE("test RZLine", "[RZLine]") { const std::vector barrel{{true, true}}; RZLine l(p, err, barrel); - REQUIRE(l.cotTheta() == Approx(cotTheta)); - REQUIRE(l.intercept() == Approx(intercept)); - REQUIRE(l.covss() == Approx(covss)); - REQUIRE(l.covii() == Approx(covii)); - REQUIRE(l.covsi() == Approx(covsi)); + REQUIRE_THAT(l.cotTheta(), Catch::Matchers::WithinRel(cotTheta)); + REQUIRE_THAT(l.intercept(), Catch::Matchers::WithinRel(intercept)); + REQUIRE_THAT(l.covss(), Catch::Matchers::WithinRel(covss)); + REQUIRE_THAT(l.covii(), Catch::Matchers::WithinRel(covii)); + REQUIRE_THAT(l.covsi(), Catch::Matchers::WithinRel(covsi)); REQUIRE_THAT(l.chi2(), Catch::Matchers::WithinAbs(chi2, chi2_diff)); } } diff --git a/RecoTracker/TkSeedingLayers/test/test_catch2_SeedingHitSet.cpp b/RecoTracker/TkSeedingLayers/test/test_catch2_SeedingHitSet.cpp index 4bdea0ef1e957..8d4186e8a2f5f 100644 --- a/RecoTracker/TkSeedingLayers/test/test_catch2_SeedingHitSet.cpp +++ b/RecoTracker/TkSeedingLayers/test/test_catch2_SeedingHitSet.cpp @@ -6,7 +6,7 @@ #include "DataFormats/TrackerRecHit2D/interface/MTDTrackingRecHit.h" #include "DataFormats/TrackerRecHit2D/interface/Phase2TrackerRecHit1D.h" -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include diff --git a/RecoTracker/TkSeedingLayers/test/test_catch2_main.cpp b/RecoTracker/TkSeedingLayers/test/test_catch2_main.cpp index e6d1d565b15c0..c247ea2c0f991 100644 --- a/RecoTracker/TkSeedingLayers/test/test_catch2_main.cpp +++ b/RecoTracker/TkSeedingLayers/test/test_catch2_main.cpp @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/RecoVertex/BeamSpotProducer/test/testBeamSpotAnalyzer.cc b/RecoVertex/BeamSpotProducer/test/testBeamSpotAnalyzer.cc index cdd0d381b5222..12e870ac91f31 100644 --- a/RecoVertex/BeamSpotProducer/test/testBeamSpotAnalyzer.cc +++ b/RecoVertex/BeamSpotProducer/test/testBeamSpotAnalyzer.cc @@ -1,7 +1,7 @@ #include "FWCore/TestProcessor/interface/TestProcessor.h" #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" TEST_CASE("BeamSpotAnalyzer tests", "[BeamSpotAnalyzer]") { //The python configuration diff --git a/RecoVertex/BeamSpotProducer/test/testBeamSpotCompatibility.cc b/RecoVertex/BeamSpotProducer/test/testBeamSpotCompatibility.cc index 64fa5d9f015d1..63112529e92e1 100644 --- a/RecoVertex/BeamSpotProducer/test/testBeamSpotCompatibility.cc +++ b/RecoVertex/BeamSpotProducer/test/testBeamSpotCompatibility.cc @@ -3,7 +3,7 @@ #include "RecoVertex/BeamSpotProducer/plugins/BeamSpotCompatibilityChecker.cc" #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" //_________________________________________________________ TEST_CASE("Significance Calculation", "[Significance]") { @@ -16,7 +16,7 @@ TEST_CASE("Significance Calculation", "[Significance]") { float significance = sig.getSig(false); // Correct the expected value based on actual calculation - REQUIRE(significance == Approx(1.1094).epsilon(10e-6)); + REQUIRE_THAT(significance, Catch::Matchers::WithinRel(1.1094, 10e-6)); } //_________________________________________________________ @@ -54,10 +54,10 @@ TEST_CASE("BeamSpot Compatibility Checker", "[compareBS]") { std::cout << "Significance[" << i << "]: " << significances[i] << std::endl; } - REQUIRE(significances[0] == Approx(0.57735).epsilon(10e-6)); // x0 significance - REQUIRE(significances[1] == Approx(0.288675).epsilon(10e-6)); // y0 significance - REQUIRE(significances[2] == Approx(0.19245).epsilon(10e-6)); // z0 significance - REQUIRE(significances[3] == Approx(0.0164957).epsilon(10e-6)); // sigmaX significance - REQUIRE(significances[4] == Approx(0.0164957).epsilon(10e-6)); // sigmaY significance - REQUIRE(significances[5] == Approx(0.288675).epsilon(10e-6)); // sigmaZ significance + REQUIRE_THAT(significances[0], Catch::Matchers::WithinRel(0.57735, 10e-6)); // x0 significance + REQUIRE_THAT(significances[1], Catch::Matchers::WithinRel(0.288675, 10e-6)); // y0 significance + REQUIRE_THAT(significances[2], Catch::Matchers::WithinRel(0.19245, 10e-6)); // z0 significance + REQUIRE_THAT(significances[3], Catch::Matchers::WithinRel(0.0164957, 10e-6)); // sigmaX significance + REQUIRE_THAT(significances[4], Catch::Matchers::WithinRel(0.0164957, 10e-6)); // sigmaY significance + REQUIRE_THAT(significances[5], Catch::Matchers::WithinRel(0.288675, 10e-6)); // sigmaZ significance } diff --git a/SimG4CMS/Calo/test/test_catch2_hffibre.cc b/SimG4CMS/Calo/test/test_catch2_hffibre.cc index 5115501013c58..e41c61e82a444 100644 --- a/SimG4CMS/Calo/test/test_catch2_hffibre.cc +++ b/SimG4CMS/Calo/test/test_catch2_hffibre.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "SimG4CMS/Calo/interface/HFFibre.h" #include #include diff --git a/SimG4CMS/Calo/test/test_catch2_hfshowerlibrary.cc b/SimG4CMS/Calo/test/test_catch2_hfshowerlibrary.cc index d4a0ef71ce52f..95f34ddb7d50a 100644 --- a/SimG4CMS/Calo/test/test_catch2_hfshowerlibrary.cc +++ b/SimG4CMS/Calo/test/test_catch2_hfshowerlibrary.cc @@ -1,4 +1,4 @@ -#include "catch.hpp" +#include "catch2/catch_all.hpp" #include "SimG4CMS/Calo/interface/HFShowerLibrary.h" #include #include diff --git a/SimG4CMS/Calo/test/test_catch2_main.cc b/SimG4CMS/Calo/test/test_catch2_main.cc index 0c7c351f437f5..b3ea47c29c7a7 100644 --- a/SimG4CMS/Calo/test/test_catch2_main.cc +++ b/SimG4CMS/Calo/test/test_catch2_main.cc @@ -1,2 +1,2 @@ #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" diff --git a/SimG4Core/Application/test/test_catch2_ThreadHandoff.cc b/SimG4Core/Application/test/test_catch2_ThreadHandoff.cc index 5f930d811cba0..7a533f81c532b 100644 --- a/SimG4Core/Application/test/test_catch2_ThreadHandoff.cc +++ b/SimG4Core/Application/test/test_catch2_ThreadHandoff.cc @@ -1,7 +1,7 @@ #include "SimG4Core/Application/interface/ThreadHandoff.h" #include "FWCore/Utilities/interface/Exception.h" #define CATCH_CONFIG_MAIN -#include "catch.hpp" +#include "catch2/catch_all.hpp" using namespace omt; TEST_CASE("Test omt::ThreadHandoff", "[ThreadHandoff]") {