Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransformerGraph clears graph when loop is introduced #42

Open
arneboe opened this issue Jun 20, 2019 · 1 comment
Open

TransformerGraph clears graph when loop is introduced #42

arneboe opened this issue Jun 20, 2019 · 1 comment

Comments

@arneboe
Copy link
Contributor

arneboe commented Jun 20, 2019

We found a special corner case that seems to clear the graph when introducing a loop in the TransformerGraph.

Test case to reproduce:

BOOST_AUTO_TEST_CASE(it_handles_loops_without_breaking)
{
    NodePtr root(TransformerGraph::create("root"));
    
    TransformerGraph::setTransformation(*root, "frame1", "frame2", Identity, Zero);
    TransformerGraph::setTransformation(*root, "frame3", "frame1", Identity, Zero);
    TransformerGraph::setTransformation(*root, "frame3", "frame2", Identity, Zero);

    BOOST_REQUIRE(TransformerGraph::hasFrame(*root, "frame1"));
    BOOST_REQUIRE(TransformerGraph::hasFrame(*root, "frame2"));
    BOOST_REQUIRE(TransformerGraph::hasFrame(*root, "frame3"));
}

@doudou
Copy link
Member

doudou commented Jun 25, 2019

Can you try #43 ?

It would be great if you could integrate your test, but make it actually test whether the resulting tree is valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants