diff --git a/test/TransitivePathTest.cpp b/test/TransitivePathTest.cpp index 8797ac612c..2998b2b368 100644 --- a/test/TransitivePathTest.cpp +++ b/test/TransitivePathTest.cpp @@ -76,8 +76,11 @@ class TransitivePathTest : ad_utility::makeExecutionTree( qec, std::move(std::get>(sideTable)), sideVars, false, std::vector{sideTableCol}); - return isLeft ? T->bindLeftSide(operation, sideTableCol) - : T->bindRightSide(operation, sideTableCol); + auto boundPath = isLeft ? T->bindLeftSide(operation, sideTableCol) + : T->bindRightSide(operation, sideTableCol); + + EXPECT_TRUE(boundPath->isBoundOrId()); + return boundPath; } // ___________________________________________________________________________ @@ -137,6 +140,8 @@ TEST_P(TransitivePathTest, idToId) { makePathUnbound(std::move(sub), {Variable{"?start"}, Variable{"?target"}}, left, right, 1, std::numeric_limits::max()); + EXPECT_TRUE(T->isBoundOrId()); + auto resultTable = T->computeResultOnlyForTesting(requestLaziness()); assertResultMatchesIdTable(resultTable, expected); } @@ -153,6 +158,8 @@ TEST_P(TransitivePathTest, idToVar) { makePathUnbound(std::move(sub), {Variable{"?start"}, Variable{"?target"}}, left, right, 1, std::numeric_limits::max()); + EXPECT_TRUE(T->isBoundOrId()); + auto resultTable = T->computeResultOnlyForTesting(requestLaziness()); assertResultMatchesIdTable(resultTable, expected); } @@ -173,6 +180,8 @@ TEST_P(TransitivePathTest, varToId) { makePathUnbound(std::move(sub), {Variable{"?start"}, Variable{"?target"}}, left, right, 1, std::numeric_limits::max()); + EXPECT_TRUE(T->isBoundOrId()); + auto resultTable = T->computeResultOnlyForTesting(requestLaziness()); assertResultMatchesIdTable(resultTable, expected); } @@ -189,6 +198,8 @@ TEST_P(TransitivePathTest, idToVarMinLengthZero) { makePathUnbound(std::move(sub), {Variable{"?start"}, Variable{"?target"}}, left, right, 0, std::numeric_limits::max()); + EXPECT_TRUE(T->isBoundOrId()); + auto resultTable = T->computeResultOnlyForTesting(requestLaziness()); assertResultMatchesIdTable(resultTable, expected); } @@ -210,6 +221,8 @@ TEST_P(TransitivePathTest, varToIdMinLengthZero) { makePathUnbound(std::move(sub), {Variable{"?start"}, Variable{"?target"}}, left, right, 0, std::numeric_limits::max()); + EXPECT_TRUE(T->isBoundOrId()); + auto resultTable = T->computeResultOnlyForTesting(requestLaziness()); assertResultMatchesIdTable(resultTable, expected); } @@ -238,6 +251,8 @@ TEST_P(TransitivePathTest, varTovar) { makePathUnbound(std::move(sub), {Variable{"?start"}, Variable{"?target"}}, left, right, 1, std::numeric_limits::max()); + EXPECT_FALSE(T->isBoundOrId()); + auto resultTable = T->computeResultOnlyForTesting(requestLaziness()); assertResultMatchesIdTable(resultTable, expected); } @@ -278,6 +293,8 @@ TEST_P(TransitivePathTest, unlimitedMaxLength) { makePathUnbound(std::move(sub), {Variable{"?start"}, Variable{"?target"}}, left, right, 1, std::numeric_limits::max()); + EXPECT_FALSE(T->isBoundOrId()); + auto resultTable = T->computeResultOnlyForTesting(requestLaziness()); assertResultMatchesIdTable(resultTable, expected); } @@ -571,6 +588,8 @@ TEST_P(TransitivePathTest, maxLength2FromVariable) { auto T = makePathUnbound(std::move(sub), {Variable{"?start"}, Variable{"?target"}}, left, right, 1, 2); + + EXPECT_FALSE(T->isBoundOrId()); auto resultTable = T->computeResultOnlyForTesting(requestLaziness()); assertResultMatchesIdTable(resultTable, expected); } @@ -599,6 +618,8 @@ TEST_P(TransitivePathTest, maxLength2FromId) { auto T = makePathUnbound(std::move(sub), {Variable{"?start"}, Variable{"?target"}}, left, right, 1, 2); + + EXPECT_TRUE(T->isBoundOrId()); auto resultTable = T->computeResultOnlyForTesting(requestLaziness()); assertResultMatchesIdTable(resultTable, expected); } @@ -626,6 +647,8 @@ TEST_P(TransitivePathTest, maxLength2ToId) { auto T = makePathUnbound(std::move(sub), {Variable{"?start"}, Variable{"?target"}}, left, right, 1, 2); + + EXPECT_TRUE(T->isBoundOrId()); auto resultTable = T->computeResultOnlyForTesting(requestLaziness()); assertResultMatchesIdTable(resultTable, expected); } @@ -689,6 +712,8 @@ TEST_P(TransitivePathTest, clone) { makePathUnbound(sub.clone(), {Variable{"?start"}, Variable{"?target"}}, left, right, 0, std::numeric_limits::max()); + EXPECT_FALSE(transitivePath->isBoundOrId()); + auto clone = transitivePath->clone(); ASSERT_TRUE(clone); EXPECT_THAT(*transitivePath, IsDeepCopy(*clone));