mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
iOS: added fabric/core ComponentDescriptor tests
Summary: Basic test for ComponentDescriptor mechanism. Reviewed By: shergin Differential Revision: D7388297 fbshipit-source-id: 3b0c625656e31df03d71a2e036388621a5e2e21d
This commit is contained in:
committed by
Facebook Github Bot
parent
e254474d4c
commit
408a5f264b
@@ -11,29 +11,10 @@
|
||||
#include <fabric/core/ShadowNode.h>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "TestComponent.h"
|
||||
|
||||
using namespace facebook::react;
|
||||
|
||||
class TestProps : public Props {
|
||||
public:
|
||||
TestProps() {
|
||||
RawProps raw;
|
||||
raw["nativeID"] = "testNativeID";
|
||||
apply(raw);
|
||||
}
|
||||
};
|
||||
using SharedTestProps = std::shared_ptr<const TestProps>;
|
||||
|
||||
class TestShadowNode;
|
||||
using SharedTestShadowNode = std::shared_ptr<const TestShadowNode>;
|
||||
class TestShadowNode : public ConcreteShadowNode<TestProps> {
|
||||
public:
|
||||
using ConcreteShadowNode::ConcreteShadowNode;
|
||||
|
||||
ComponentName getComponentName() const override {
|
||||
return ComponentName("Test");
|
||||
}
|
||||
};
|
||||
|
||||
TEST(ShadowNodeTest, handleProps) {
|
||||
RawProps raw;
|
||||
raw["nativeID"] = "abc";
|
||||
|
||||
Reference in New Issue
Block a user