Skip to content

Commit 48bde8d

Browse files
committed
test_pruning.cpp: Extend test to ParallelContainer
1 parent 42a08d6 commit 48bde8d

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

core/test/test_pruning.cpp

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,20 @@ TEST_F(Pruning, ConnectReactivatesPrunedPaths) {
6565
// same as before, but wrapping Connect into a container
6666
template <typename T>
6767
struct PruningContainerTests : public Pruning
68-
{
69-
void test() {
70-
add(t, new BackwardMockup);
71-
add(t, new GeneratorMockup({ 0 }));
72-
auto c = new T();
73-
add(*c, new ConnectMockup());
74-
add(t, c);
75-
add(t, new GeneratorMockup({ 0 }));
76-
77-
EXPECT_TRUE(t.plan());
78-
EXPECT_EQ(t.solutions().size(), 1u);
79-
}
80-
};
81-
using ContainerTypes = ::testing::Types<SerialContainer>; // TODO: fails for Fallbacks!
68+
{};
69+
70+
using ContainerTypes = ::testing::Types<SerialContainer, Fallbacks>;
8271
TYPED_TEST_SUITE(PruningContainerTests, ContainerTypes);
8372
TYPED_TEST(PruningContainerTests, ConnectReactivatesPrunedPaths) {
84-
this->test();
73+
this->add(this->t, new BackwardMockup);
74+
this->add(this->t, new GeneratorMockup({ 0 }));
75+
auto c = new TypeParam();
76+
this->add(*c, new ConnectMockup());
77+
this->add(this->t, c);
78+
this->add(this->t, new GeneratorMockup({ 0 }));
79+
80+
EXPECT_TRUE(this->t.plan());
81+
EXPECT_EQ(this->t.solutions().size(), 1u);
8582
}
8683

8784
TEST_F(Pruning, ConnectConnectForward) {

0 commit comments

Comments
 (0)