@@ -343,6 +343,30 @@ TEST_F(SerialTest, init_generator) {
343343 EXPECT_INIT_FAILURE (true , true , GEN, GEN); // two generator stages cannot be connected
344344}
345345
346+ TEST_F (SerialTest, keep_configured_propagator_interface) {
347+ // configuring an ANY propagator should work
348+ EXPECT_INIT_SUCCESS (false , true , ANY);
349+ EXPECT_EQ (container.pimpl ()->children ().front ()->pimpl ()->requiredInterface (), InterfaceFlags (PROPAGATE_FORWARDS));
350+
351+ // multiple times
352+ validateInit (false , true , false );
353+ EXPECT_EQ (container.pimpl ()->children ().front ()->pimpl ()->requiredInterface (), InterfaceFlags (PROPAGATE_FORWARDS));
354+ // and with another interface direction as well
355+ validateInit (true , false , false );
356+ EXPECT_EQ (container.pimpl ()->children ().front ()->pimpl ()->requiredInterface (), InterfaceFlags (PROPAGATE_BACKWARDS));
357+
358+ // configuring a FORWARD propagator should work in forward direction
359+ EXPECT_INIT_SUCCESS (false , true , FW);
360+ // but fail when initialized in backward direction
361+ validateInit (true , false , true );
362+ EXPECT_EQ (container.pimpl ()->children ().front ()->pimpl ()->requiredInterface (), InterfaceFlags (PROPAGATE_FORWARDS));
363+
364+ // same with BACKWARD propagator
365+ EXPECT_INIT_SUCCESS (true , false , BW);
366+ validateInit (false , true , true );
367+ EXPECT_EQ (container.pimpl ()->children ().front ()->pimpl ()->requiredInterface (), InterfaceFlags (PROPAGATE_BACKWARDS));
368+ }
369+
346370TEST_F (SerialTest, init_forward) {
347371 // container interface doesn't match children
348372 EXPECT_INIT_FAILURE (false , false , FW);
0 commit comments