Skip to content

Commit

Permalink
add test with a bogus link path
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy committed Nov 13, 2024
1 parent 0ffff6e commit 6f1897b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sofa/framework/SimpleApi/test/SimpleApi_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,15 @@ TEST(SimpleApi_test_solo, testIsSetWithDataLink)
});
auto* objdata4 = obj4->findData("printLog");
ASSERT_TRUE(objdata4->isSet());

// test link with a wrong path (or non existent parent)
const auto obj6 = createObject(root, "DefaultAnimationLoop", {
{"name", "loop6"},
{"printLog", "@/loop7.printLog"}
});

auto* objdata6 = obj6->findData("printLog");
ASSERT_TRUE(objdata6->isSet());
ASSERT_EQ(objdata6->getParent(), nullptr);

}

0 comments on commit 6f1897b

Please sign in to comment.