File indexing completed on 2025-01-18 10:17:41
0001
0002
0003
0004
0005
0006 #include "catch.hpp"
0007 #include "ExactlyOnceTests.h"
0008
0009 #include <JANA/JEventSourceGeneratorT.h>
0010 #include <JANA/JApplication.h>
0011
0012 TEST_CASE("ExactlyOnceTests") {
0013
0014 JApplication app;
0015
0016 auto source = new SimpleSource();
0017 auto processor = new SimpleProcessor();
0018
0019 app.Add(source);
0020 app.Add(processor);
0021 app.SetParameterValue("jana:extended_report", 0);
0022
0023 REQUIRE(source->open_count == 0);
0024 REQUIRE(source->close_count == 0);
0025 REQUIRE(processor->init_count == 0);
0026 REQUIRE(processor->finish_count == 0);
0027
0028 app.Run(true);
0029
0030 REQUIRE(source->open_count == 1);
0031 REQUIRE(source->close_count == 1);
0032 REQUIRE(processor->init_count == 1);
0033 REQUIRE(processor->finish_count == 1);
0034 }
0035
0036
0037