24 #include "cheetah/pipeline/test/PipelineHandlerFactoryTest.h" 25 #include "cheetah/pipeline/PipelineHandlerFactory.h" 26 #include "cheetah/pipeline/CheetahConfig.h" 27 #include "cheetah/pipeline/BeamConfig.h" 35 PipelineHandlerFactoryTest::PipelineHandlerFactoryTest()
40 PipelineHandlerFactoryTest::~PipelineHandlerFactoryTest()
44 void PipelineHandlerFactoryTest::SetUp()
48 void PipelineHandlerFactoryTest::TearDown()
52 TEST_F(PipelineHandlerFactoryTest, test_create)
54 pipeline::CheetahConfig<uint8_t> config;
55 BeamConfig<uint8_t> beam_config;
56 pipeline::PipelineHandlerFactory factory(config);
57 for(
auto const& handler : factory.available() ) {
58 std::cout <<
"testing handler '" << handler <<
"'" << std::endl;
60 auto type = factory.create(handler, beam_config);
61 ASSERT_NE(
nullptr, type ) << handler;
63 }
catch (panda::Error) {}
65 std::cout <<
"testing timed handler '" << handler <<
"'" << std::endl;
67 auto timed_type = factory.create_timed(handler, beam_config);
68 ASSERT_NE(
nullptr, timed_type ) << handler;
70 }
catch (panda::Error) {}
74 TEST_F(PipelineHandlerFactoryTest, test_tdas_config)
76 pipeline::CheetahConfig<uint8_t> config;
77 BeamConfig<uint8_t> beam_config;
78 pipeline::PipelineHandlerFactory factory(config);
80 ASSERT_THROW(factory.create(
"Tdas", beam_config), panda::Error);
83 config.sift_config().template config<sift::simple_sift::Config>().active(
true);
85 config.fldo_config().template config<fldo::cuda::Config>().active(
true);
87 pipeline::PipelineHandlerFactory newFactory(config);
89 ASSERT_NO_THROW(
auto type = newFactory.create(
"Tdas", beam_config);
delete type);
Some limits and constants for FLDO.