Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:50

0001 #include "catch.hpp"
0002 #include "FWCore/TestProcessor/interface/TestProcessor.h"
0003 #include "FWCore/Utilities/interface/Exception.h"
0004 
0005 #include "DataFormats/Common/interface/PathStatus.h"
0006 
0007 #include <memory>
0008 #include <utility>
0009 
0010 static constexpr auto s_tag = "[PathStatusFilter]";
0011 
0012 TEST_CASE("Standard checks of PathStatusFilter", s_tag) {
0013   const std::string baseConfig{
0014       R"_(from FWCore.TestProcessor.TestProcess import *
0015 process = TestProcess()
0016 process.toTest = cms.EDFilter("PathStatusFilter")
0017 process.moduleToTest(process.toTest)
0018 )_"};
0019 
0020   SECTION("module constructor") {
0021     edm::test::TestProcessor::Config config{baseConfig};
0022     REQUIRE_NOTHROW(edm::test::TestProcessor(config));
0023   }
0024 
0025   SECTION("No event data, empty expression") {
0026     edm::test::TestProcessor::Config config{baseConfig};
0027     edm::test::TestProcessor tester(config);
0028     REQUIRE_NOTHROW(tester.test());
0029 
0030     auto event = tester.test();
0031     REQUIRE(event.modulePassed());
0032   }
0033 
0034   SECTION("Only a single path in expression") {
0035     std::string fullConfig = baseConfig +
0036                              R"_(process.toTest.logicalExpression = cms.string("pathname")
0037                              )_";
0038     edm::test::TestProcessor::Config testConfig{fullConfig};
0039     auto token = testConfig.produces<edm::PathStatus>("pathname");
0040     edm::test::TestProcessor tester(testConfig);
0041     auto event = tester.test(std::make_pair(token, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0042     REQUIRE(event.modulePassed());
0043 
0044     event = tester.test(std::make_pair(token, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0045     REQUIRE(!event.modulePassed());
0046 
0047     REQUIRE_THROWS(tester.test());
0048   }
0049 
0050   SECTION("test the operator 'and'") {
0051     std::string fullConfig = baseConfig +
0052                              R"_(process.toTest.logicalExpression = cms.string("path1 and path2")
0053                              )_";
0054     edm::test::TestProcessor::Config testConfig{fullConfig};
0055     auto token1 = testConfig.produces<edm::PathStatus>("path1");
0056     auto token2 = testConfig.produces<edm::PathStatus>("path2");
0057     edm::test::TestProcessor tester(testConfig);
0058     auto event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0059                              std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0060     REQUIRE(event.modulePassed());
0061     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0062                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0063     REQUIRE(!event.modulePassed());
0064     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0065                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0066     REQUIRE(!event.modulePassed());
0067     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0068                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0069     REQUIRE(!event.modulePassed());
0070   }
0071 
0072   SECTION("test the operator 'or'") {
0073     std::string fullConfig = baseConfig +
0074                              R"_(process.toTest.logicalExpression = cms.string("path1 or path2")
0075                              )_";
0076     edm::test::TestProcessor::Config testConfig{fullConfig};
0077     auto token1 = testConfig.produces<edm::PathStatus>("path1");
0078     auto token2 = testConfig.produces<edm::PathStatus>("path2");
0079     edm::test::TestProcessor tester(testConfig);
0080     auto event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0081                              std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0082     REQUIRE(event.modulePassed());
0083     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0084                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0085     REQUIRE(event.modulePassed());
0086     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0087                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0088     REQUIRE(event.modulePassed());
0089     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0090                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0091     REQUIRE(!event.modulePassed());
0092   }
0093 
0094   SECTION("test operator 'not'") {
0095     std::string fullConfig = baseConfig +
0096                              R"_(process.toTest.logicalExpression = cms.string("not pathname")
0097                              )_";
0098     edm::test::TestProcessor::Config testConfig{fullConfig};
0099     auto token = testConfig.produces<edm::PathStatus>("pathname");
0100     edm::test::TestProcessor tester(testConfig);
0101     auto event = tester.test(std::make_pair(token, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0102     REQUIRE(!event.modulePassed());
0103 
0104     event = tester.test(std::make_pair(token, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0105     REQUIRE(event.modulePassed());
0106   }
0107 
0108   SECTION("test precedence") {
0109     std::string fullConfig = baseConfig +
0110                              R"_(process.toTest.logicalExpression = cms.string("path1 or path2 and path3")
0111                              )_";
0112     edm::test::TestProcessor::Config testConfig{fullConfig};
0113     auto token1 = testConfig.produces<edm::PathStatus>("path1");
0114     auto token2 = testConfig.produces<edm::PathStatus>("path2");
0115     auto token3 = testConfig.produces<edm::PathStatus>("path3");
0116     edm::test::TestProcessor tester(testConfig);
0117     auto event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0118                              std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0119                              std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0120     REQUIRE(event.modulePassed());
0121     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0122                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0123                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0124     REQUIRE(event.modulePassed());
0125     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0126                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0127                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0128     REQUIRE(event.modulePassed());
0129     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0130                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0131                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0132     REQUIRE(event.modulePassed());
0133     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0134                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0135                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0136     REQUIRE(event.modulePassed());
0137     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0138                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0139                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0140     REQUIRE(!event.modulePassed());
0141     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0142                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0143                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0144     REQUIRE(!event.modulePassed());
0145     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0146                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0147                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0148     REQUIRE(!event.modulePassed());
0149   }
0150   SECTION("test parenthesis") {
0151     std::string fullConfig = baseConfig +
0152                              R"_(process.toTest.logicalExpression = cms.string("(path1 or path2) and path3")
0153                              )_";
0154     edm::test::TestProcessor::Config testConfig{fullConfig};
0155     auto token1 = testConfig.produces<edm::PathStatus>("path1");
0156     auto token2 = testConfig.produces<edm::PathStatus>("path2");
0157     auto token3 = testConfig.produces<edm::PathStatus>("path3");
0158     edm::test::TestProcessor tester(testConfig);
0159     auto event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0160                              std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0161                              std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0162     REQUIRE(event.modulePassed());
0163     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0164                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0165                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0166     REQUIRE(!event.modulePassed());
0167     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0168                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0169                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0170     REQUIRE(event.modulePassed());
0171     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0172                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0173                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0174     REQUIRE(!event.modulePassed());
0175     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0176                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0177                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0178     REQUIRE(event.modulePassed());
0179     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0180                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0181                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0182     REQUIRE(!event.modulePassed());
0183     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0184                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0185                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0186     REQUIRE(!event.modulePassed());
0187     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0188                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0189                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0190     REQUIRE(!event.modulePassed());
0191   }
0192 
0193   SECTION("test extra space between pathnames and operators") {
0194     std::string fullConfig =
0195         baseConfig +
0196         R"_(process.toTest.logicalExpression = cms.string("\t    path1   \t and \t  path2 \t and \t not(path3)and not not not path4 or(path5)and  not (  path6 or(path7)) \t   ")
0197                              )_";
0198     edm::test::TestProcessor::Config testConfig{fullConfig};
0199     auto token1 = testConfig.produces<edm::PathStatus>("path1");
0200     auto token2 = testConfig.produces<edm::PathStatus>("path2");
0201     auto token3 = testConfig.produces<edm::PathStatus>("path3");
0202     auto token4 = testConfig.produces<edm::PathStatus>("path4");
0203     auto token5 = testConfig.produces<edm::PathStatus>("path5");
0204     auto token6 = testConfig.produces<edm::PathStatus>("path6");
0205     auto token7 = testConfig.produces<edm::PathStatus>("path7");
0206     edm::test::TestProcessor tester(testConfig);
0207     auto event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0208                              std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0209                              std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0210                              std::make_pair(token4, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0211                              std::make_pair(token5, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0212                              std::make_pair(token6, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0213                              std::make_pair(token7, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0214     REQUIRE(event.modulePassed());
0215     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0216                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0217                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0218                         std::make_pair(token4, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0219                         std::make_pair(token5, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0220                         std::make_pair(token6, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0221                         std::make_pair(token7, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0222     REQUIRE(!event.modulePassed());
0223     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0224                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0225                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0226                         std::make_pair(token4, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0227                         std::make_pair(token5, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0228                         std::make_pair(token6, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0229                         std::make_pair(token7, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0230     REQUIRE(!event.modulePassed());
0231     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0232                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0233                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0234                         std::make_pair(token4, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0235                         std::make_pair(token5, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0236                         std::make_pair(token6, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0237                         std::make_pair(token7, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0238     REQUIRE(!event.modulePassed());
0239     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0240                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0241                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0242                         std::make_pair(token4, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0243                         std::make_pair(token5, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0244                         std::make_pair(token6, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0245                         std::make_pair(token7, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0246     REQUIRE(!event.modulePassed());
0247     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0248                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0249                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0250                         std::make_pair(token4, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0251                         std::make_pair(token5, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0252                         std::make_pair(token6, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0253                         std::make_pair(token7, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0254     REQUIRE(event.modulePassed());
0255     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0256                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0257                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0258                         std::make_pair(token4, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0259                         std::make_pair(token5, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0260                         std::make_pair(token6, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0261                         std::make_pair(token7, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0262     REQUIRE(!event.modulePassed());
0263     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0264                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0265                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0266                         std::make_pair(token4, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0267                         std::make_pair(token5, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0268                         std::make_pair(token6, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0269                         std::make_pair(token7, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0270     REQUIRE(!event.modulePassed());
0271     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0272                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0273                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0274                         std::make_pair(token4, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0275                         std::make_pair(token5, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0276                         std::make_pair(token6, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0277                         std::make_pair(token7, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0278     REQUIRE(!event.modulePassed());
0279   }
0280 
0281   SECTION("test single character pathname") {
0282     std::string fullConfig = baseConfig +
0283                              R"_(process.toTest.logicalExpression = cms.string("a")
0284                              )_";
0285     edm::test::TestProcessor::Config testConfig{fullConfig};
0286     auto token = testConfig.produces<edm::PathStatus>("a");
0287     edm::test::TestProcessor tester(testConfig);
0288     auto event = tester.test(std::make_pair(token, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0289     REQUIRE(event.modulePassed());
0290 
0291     event = tester.test(std::make_pair(token, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0292     REQUIRE(!event.modulePassed());
0293   }
0294 
0295   SECTION("test pathnames containing an operator name and duplicate pathnames") {
0296     std::string fullConfig = baseConfig +
0297                              R"_(process.toTest.logicalExpression = cms.string("nota and nota and anot")
0298                              )_";
0299     edm::test::TestProcessor::Config testConfig{fullConfig};
0300     auto token1 = testConfig.produces<edm::PathStatus>("nota");
0301     auto token2 = testConfig.produces<edm::PathStatus>("anot");
0302     edm::test::TestProcessor tester(testConfig);
0303     auto event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0304                              std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0305     REQUIRE(event.modulePassed());
0306     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0307                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0308     REQUIRE(!event.modulePassed());
0309     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0310                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0311     REQUIRE(!event.modulePassed());
0312     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0313                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0314     REQUIRE(!event.modulePassed());
0315   }
0316 
0317   SECTION("test multiple parentheses and 'not's") {
0318     std::string fullConfig =
0319         baseConfig +
0320         R"_(process.toTest.logicalExpression = cms.string("not not not (((not(not(((((not not path1))) or path2))) and path3)))")
0321                              )_";
0322     edm::test::TestProcessor::Config testConfig{fullConfig};
0323     auto token1 = testConfig.produces<edm::PathStatus>("path1");
0324     auto token2 = testConfig.produces<edm::PathStatus>("path2");
0325     auto token3 = testConfig.produces<edm::PathStatus>("path3");
0326     edm::test::TestProcessor tester(testConfig);
0327     auto event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0328                              std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0329                              std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0330     REQUIRE(!event.modulePassed());
0331     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0332                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0333                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0334     REQUIRE(event.modulePassed());
0335     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0336                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0337                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0338     REQUIRE(!event.modulePassed());
0339     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0340                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0341                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0342     REQUIRE(event.modulePassed());
0343     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0344                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0345                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0346     REQUIRE(!event.modulePassed());
0347     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0348                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Pass)),
0349                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0350     REQUIRE(event.modulePassed());
0351     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0352                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0353                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Pass)));
0354     REQUIRE(event.modulePassed());
0355     event = tester.test(std::make_pair(token1, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0356                         std::make_pair(token2, std::make_unique<edm::PathStatus>(edm::hlt::Fail)),
0357                         std::make_pair(token3, std::make_unique<edm::PathStatus>(edm::hlt::Fail)));
0358     REQUIRE(event.modulePassed());
0359   }
0360 }