Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:17:39

0001 // Copyright 2020, Jefferson Science Associates, LLC.
0002 // Subject to the terms in the LICENSE file found in the top-level directory.
0003 
0004 // This is the entry point for our test suite executable.
0005 // Catch2 will take over from here.
0006 #define CATCH_CONFIG_MAIN
0007 #include "catch.hpp"
0008 
0009 #include <JANA/JApplication.h>
0010 #include <JANA/JFactoryGenerator.h>
0011 #include "JControlEventProcessor.h"
0012 
0013 
0014 // This is where you can assemble various components and verify that when put together, they
0015 // do what you'd expect. This means you can skip the laborious mixing and matching of plugins and configurations,
0016 // and have everything run automatically inside one executable.
0017 
0018 TEST_CASE("JANAControlIntegrationTests") {
0019 
0020     auto app = new JApplication;
0021 
0022     // Create and register components
0023     app->AddPlugin("JTest");
0024     app->Add(new JControlEventProcessor);
0025 
0026     // Set test parameters
0027     app->SetParameterValue("nevents", 10);
0028 
0029     // Run everything, blocking until finished
0030     app->Run();
0031 
0032     // Verify the results you'd expect
0033     REQUIRE(app->GetNEventsProcessed() == 10);
0034 
0035 }
0036