Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include "FWCore/TestProcessor/interface/TestProcessor.h"

#define CATCH_CONFIG_MAIN
#include "catch.hpp"

TEST_CASE("AlcaBeamMonitor tests", "[AlcaBeamMonitor]") {
  //The python configuration
  edm::test::TestProcessor::Config config{
      R"_(from FWCore.TestProcessor.TestProcess import *
from DQM.BeamMonitor.AlcaBeamMonitor_cfi import AlcaBeamMonitor
process = TestProcess()
process.beamMonitor = AlcaBeamMonitor
process.moduleToTest(process.beamMonitor)
process.add_(cms.Service("DQMStore"))
)_"};

  SECTION("Run with no Lumis") {
    edm::test::TestProcessor tester{config};
    tester.testRunWithNoLuminosityBlocks();
    //get here without an exception or crashing
    REQUIRE(true);
  };
}