Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Alignment/HIPAlignmentAlgorithm/test/testHIPAnalyzers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <format>

#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "catch2/catch_all.hpp"

// Function to run the catch2 tests
//___________________________________________________________________________________________
Expand Down
2 changes: 1 addition & 1 deletion Alignment/OfflineValidation/test/testTrackAnalyzers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include <format>
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "catch2/catch_all.hpp"

// Function to run the catch2 tests
//___________________________________________________________________________________________
Expand Down
2 changes: 1 addition & 1 deletion CUDADataFormats/Common/test/test_Product.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "catch.hpp"
#include "catch2/catch_all.hpp"

#include "CUDADataFormats/Common/interface/Product.h"
#include "HeterogeneousCore/CUDACore/interface/ScopedContext.h"
Expand Down
2 changes: 1 addition & 1 deletion CUDADataFormats/Common/test/test_main.cc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "catch2/catch_all.hpp"
Original file line number Diff line number Diff line change
Expand Up @@ -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 <set>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion CalibFormats/SiStripObjects/test/test_catch2_main.cc
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <format>

#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "catch2/catch_all.hpp"

// Function to run the catch2 tests
//___________________________________________________________________________________________
Expand Down
2 changes: 1 addition & 1 deletion CommonTools/BaseParticlePropagator/test/makeMuon_catch2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "catch.hpp"
#include "catch2/catch_all.hpp"
#include "CondCore/CondHDF5ESSource/plugins/convertSyncValue.h"

using namespace cond::hdf5;
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion CondCore/CondHDF5ESSource/test/test_catch2_h5cpp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

// system include files
#include <cassert>
#include "catch.hpp"
#include "catch2/catch_all.hpp"

// user include files
#include "FWCore/Utilities/interface/FileInPath.h"
Expand Down
2 changes: 1 addition & 1 deletion CondCore/CondHDF5ESSource/test/test_catch2_main.cc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "catch2/catch_all.hpp"
Original file line number Diff line number Diff line change
@@ -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 <iostream>

TEST_CASE("EcalPulseSymmCovariance testing", "[EcalPulseSymmCovariance]") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//

// system include files
#include "catch.hpp"
#include "catch2/catch_all.hpp"

// user include files
#include "CondFormats/SerializationHelper/interface/SerializationHelper.h"
Expand Down
2 changes: 1 addition & 1 deletion CondFormats/SerializationHelper/test/test_catch2_main.cc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "catch2/catch_all.hpp"
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "catch.hpp"
#include "catch2/catch_all.hpp"
#include <iostream>
#include <iomanip> // std::setw
#include "CondFormats/SiStripObjects/interface/SiStripBadStrip.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <sstream>
#include "catch.hpp"
#include "catch2/catch_all.hpp"
#include <iostream>
#include <iomanip> // std::setw

Expand Down
2 changes: 1 addition & 1 deletion CondFormats/SiStripObjects/test/test_catch2_main.cpp
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 3 additions & 3 deletions CondTools/RunInfo/test/test_catch2_LHCInfoPerFillPopCon.cpp
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -336,7 +336,7 @@ TEST_CASE("LHCInfoPerFillPopConSourceHandler.getNewObjects fills IOVs correctly

// Populate mock data
std::vector<unsigned short> fillNumbers = {1000};
std::vector<float> energies = {GENERATE(450.0, 6600.0, 8000.0)};
std::vector<float> energies = {GENERATE(450.0f, 6600.0f, 8000.0f)};
std::vector<boost::posix_time::ptime> fillStartTimes = {boost::posix_time::time_from_string("2023-06-01 11:30:00")};
std::vector<boost::posix_time::ptime> fillStableBeamBeginTimes = {
boost::posix_time::time_from_string("2023-06-01 12:00:00")};
Expand Down Expand Up @@ -436,7 +436,7 @@ TEST_CASE(

// Populate mock data
std::vector<unsigned short> fillNumbers = {1000};
std::vector<float> energies = {GENERATE(-6800., -1., 0., 449.9, 8000.1)}; // invalid energy
std::vector<float> energies = {GENERATE(-6800.f, -1.f, 0.f, 449.9f, 8000.1f)}; // invalid energy
std::vector<boost::posix_time::ptime> fillStartTimes = {boost::posix_time::time_from_string("2023-06-01 11:30:00")};
std::vector<boost::posix_time::ptime> fillStableBeamBeginTimes = {
boost::posix_time::time_from_string("2023-06-01 12:00:00")};
Expand Down
2 changes: 1 addition & 1 deletion DQM/BeamMonitor/test/testAlcaBeamMonitor.cc
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion DQM/EcalCommon/test/testEcalCommon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <format>

#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "catch2/catch_all.hpp"

// Function to run the catch2 tests
//___________________________________________________________________________________________
Expand Down
2 changes: 1 addition & 1 deletion DQM/TrackerRemapper/test/test_catch2_Phase1PixelMaps.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "catch.hpp"
#include "catch2/catch_all.hpp"
#include <iostream>
#include <numeric> // std::accumulate
#include "TCanvas.h"
Expand Down
2 changes: 1 addition & 1 deletion DQM/TrackerRemapper/test/test_catch2_Phase1PixelROCMaps.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "catch.hpp"
#include "catch2/catch_all.hpp"
#include <iostream>
#include <numeric> // std::accumulate
#include "TCanvas.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "catch.hpp"
#include "catch2/catch_all.hpp"
#include <iostream>
#include <numeric> // std::accumulate
#include "TCanvas.h"
Expand Down
2 changes: 1 addition & 1 deletion DQM/TrackerRemapper/test/test_catch2_SiStripTkMaps.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "catch.hpp"
#include "catch2/catch_all.hpp"
#include <iostream>
#include <numeric> // std::accumulate
#include "TCanvas.h"
Expand Down
2 changes: 1 addition & 1 deletion DQM/TrackerRemapper/test/test_catch2_main.cc
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion DQM/TrackingMonitorSource/test/testTrackingDQMAnalyzers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <format>

#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "catch2/catch_all.hpp"

// Function to run the catch2 tests
//___________________________________________________________________________________________
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Trigger/test/EgHLTComCodes_catch2_test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "catch.hpp"
#include "catch2/catch_all.hpp"

#include "DQMOffline/Trigger/interface/EgHLTComCodes.h"
#include "DQMOffline/Trigger/interface/EgHLTEgCutCodes.h"
Expand Down
2 changes: 1 addition & 1 deletion DQMOffline/Trigger/test/EgHLTTrigCodes_catch2_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
#include "catch2/catch_all.hpp"

#include "DQMOffline/Trigger/interface/EgHLTTrigCodes.h"

Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Common/test/test_catch2_BoostRange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <cassert>
#include <iostream>
#include <vector>
#include "catch.hpp"
#include "catch2/catch_all.hpp"

struct Dummy {
Dummy() : id() {}
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Common/test/test_catch2_DataFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <numeric>
#include <cstring>
#include <random>
#include "catch.hpp"
#include "catch2/catch_all.hpp"
#include "DataFormats/Common/interface/DataFrame.h"
#include "DataFormats/Common/interface/DataFrameContainer.h"

Expand Down
26 changes: 14 additions & 12 deletions DataFormats/Common/test/test_catch2_DetSetNew.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "catch.hpp"
#include "catch2/catch_all.hpp"

#include "DataFormats/Common/interface/DetSetNew.h"
#include "DataFormats/Common/interface/DetSetVectorNew.h"
Expand Down Expand Up @@ -207,7 +207,7 @@ TEST_CASE("DetSetNew", "[DetSetNew]") {

// test error conditions
REQUIRE_THROWS_MATCHES(
detsets.insert(22, 6), edm::Exception, Catch::Predicate<edm::Exception>([](edm::Exception const &e) {
detsets.insert(22, 6), edm::Exception, Catch::Matchers::Predicate<edm::Exception>([](edm::Exception const &e) {
return e.categoryCode() == edm::errors::InvalidReference;
}));
}
Expand Down Expand Up @@ -307,7 +307,7 @@ TEST_CASE("DetSetNew", "[DetSetNew]") {

// test error conditions
REQUIRE_THROWS_MATCHES(
FF(detsets, 22), edm::Exception, Catch::Predicate<edm::Exception>([](edm::Exception const &e) {
FF(detsets, 22), edm::Exception, Catch::Matchers::Predicate<edm::Exception>([](edm::Exception const &e) {
return e.categoryCode() == edm::errors::InvalidReference;
}));
REQUIRE_THROWS_MATCHES(
Expand All @@ -316,7 +316,7 @@ TEST_CASE("DetSetNew", "[DetSetNew]") {
FF ff2(d, 45);
}(detsets),
edm::Exception,
Catch::Predicate<edm::Exception>(
Catch::Matchers::Predicate<edm::Exception>(
[](edm::Exception const &e) { return e.categoryCode() == edm::errors::LogicError; }));
}

Expand Down Expand Up @@ -378,7 +378,7 @@ TEST_CASE("DetSetNew", "[DetSetNew]") {
}
SECTION("error conditions") {
REQUIRE_THROWS_MATCHES(
TSFF(detsets, 22), edm::Exception, Catch::Predicate<edm::Exception>([](edm::Exception const &e) {
TSFF(detsets, 22), edm::Exception, Catch::Matchers::Predicate<edm::Exception>([](edm::Exception const &e) {
return e.categoryCode() == edm::errors::InvalidReference;
}));
REQUIRE_THROWS_MATCHES(
Expand All @@ -387,7 +387,7 @@ TEST_CASE("DetSetNew", "[DetSetNew]") {
TSFF ff2(d, 45);
}(detsets),
edm::Exception,
Catch::Predicate<edm::Exception>(
Catch::Matchers::Predicate<edm::Exception>(
[](edm::Exception const &e) { return e.categoryCode() == edm::errors::LogicError; }));
}
}
Expand Down Expand Up @@ -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>([](edm::Exception const &e) {
return e.categoryCode() == edm::errors::InvalidReference;
}));
REQUIRE_THROWS_MATCHES(
detsets[44], edm::Exception, Catch::Matchers::Predicate<edm::Exception>([](edm::Exception const &e) {
return e.categoryCode() == edm::errors::InvalidReference;
}));
}
}

Expand Down Expand Up @@ -535,9 +536,10 @@ TEST_CASE("DetSetNew", "[DetSetNew]") {
}

SECTION("invalid index") {
REQUIRE_THROWS_MATCHES(detsets[22], edm::Exception, Catch::Predicate<edm::Exception>([](edm::Exception const &e) {
return e.categoryCode() == edm::errors::InvalidReference;
}));
REQUIRE_THROWS_MATCHES(
detsets[22], edm::Exception, Catch::Matchers::Predicate<edm::Exception>([](edm::Exception const &e) {
return e.categoryCode() == edm::errors::InvalidReference;
}));
}
DSTV detsets2;
detsets2.swap(detsets);
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Common/test/test_catch2_DetSetNewTS.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "catch.hpp"
#include "catch2/catch_all.hpp"

#include "DataFormats/Common/interface/DetSetNew.h"
#include "DataFormats/Common/interface/DetSetVectorNew.h"
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Common/test/test_catch2_DetSetVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <stdexcept>
#include <vector>

#include <catch.hpp>
#include <catch2/catch_all.hpp>

#include "DataFormats/Common/interface/DetSetVector.h"
#include "DataFormats/Common/interface/Ref.h"
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Common/test/test_catch2_DictionaryTools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typeinfo>
#include <map>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Common/test/test_catch2_MapOfVectors.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <vector>
#include <algorithm>
#include "catch.hpp"
#include "catch2/catch_all.hpp"
#include "DataFormats/Common/interface/MapOfVectors.h"

typedef edm::MapOfVectors<int, int> MII;
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Common/test/test_catch2_MultiSpan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <cmath>
#include <numeric>
#include <vector>
#include <catch.hpp>
#include <catch2/catch_all.hpp>

#include "DataFormats/Common/interface/MultiSpan.h"

Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Common/test/test_catch2_OwnVector.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <algorithm>
#include <cassert>
#include <memory>
#include "catch.hpp"
#include "catch2/catch_all.hpp"

#include "DataFormats/Common/interface/OwnVector.h"
#include "FWCore/Utilities/interface/propagate_const.h"
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Common/test/test_catch2_Ref.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <iostream>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion DataFormats/Common/test/test_catch2_RefCore.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "catch.hpp"
#include "catch2/catch_all.hpp"

#include "DataFormats/Common/interface/RefCore.h"
#include "DataFormats/Common/interface/RefCoreWithIndex.h"
Expand Down
Loading