Fabric: Fixed ConcreteShadowNode::getProps()
Summary: Apparently, there is no point to return a reference from this method because the struct (std::shared_ptr) is allocated on stack. The test is also updated. allow-large-files Reviewed By: fkgozali Differential Revision: D7557749 fbshipit-source-id: aa74146322c6d340256752586f05fc672024038e
This commit is contained in:
parent
b13d5beb11
commit
6924d44b20
|
@ -76,7 +76,7 @@ public:
|
|||
return typeid(*this).hash_code();
|
||||
}
|
||||
|
||||
const SharedConcreteProps &getProps() const {
|
||||
const SharedConcreteProps getProps() const {
|
||||
return std::static_pointer_cast<const PropsT>(props_);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,14 +41,11 @@ TEST(ShadowNodeTest, handleShadowNodeCreation) {
|
|||
ASSERT_EQ(node->getSourceNode(), nullptr);
|
||||
ASSERT_EQ(node->getChildren()->size(), 0);
|
||||
|
||||
// TODO(#27369757): getProps() doesn't work
|
||||
// ASSERT_STREQ(node->getProps()->getNativeId().c_str(), "testNativeID");
|
||||
ASSERT_STREQ(node->getProps()->getNativeId().c_str(), "testNativeID");
|
||||
|
||||
node->sealRecursive();
|
||||
ASSERT_TRUE(node->getSealed());
|
||||
|
||||
// TODO(#27369757): verify Props are also sealed.
|
||||
// ASSERT_TRUE(node->getProps()->getSealed());
|
||||
ASSERT_TRUE(node->getProps()->getSealed());
|
||||
}
|
||||
|
||||
TEST(ShadowNodeTest, handleShadowNodeSimpleCloning) {
|
||||
|
|
Loading…
Reference in New Issue