Revert D48712710: C++ Cleanup 3/N: Reorganize YGNode
Differential Revision: D48712710 Original commit changeset: d28eae38469a Original Phabricator Diff: D48712710 fbshipit-source-id: 7a10b071edcf045ce98bbf8f9deca0d0e2e80a14
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6ca56e87ce
commit
ea7f61a3db
@@ -10,7 +10,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <yoga/Yoga.h>
|
||||
#include <yoga/config/Config.h>
|
||||
#include <yoga/node/Node.h>
|
||||
#include <yoga/YGNode.h>
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
@@ -22,7 +22,7 @@ struct ConfigCloningTest : public ::testing::Test {
|
||||
void SetUp() override;
|
||||
void TearDown() override;
|
||||
|
||||
static yoga::Node clonedNode;
|
||||
static YGNode clonedNode;
|
||||
static YGNodeRef cloneNode(YGNodeRef, YGNodeRef, int) { return &clonedNode; }
|
||||
static YGNodeRef doNotClone(YGNodeRef, YGNodeRef, int) { return nullptr; }
|
||||
};
|
||||
@@ -30,7 +30,7 @@ struct ConfigCloningTest : public ::testing::Test {
|
||||
TEST_F(ConfigCloningTest, uses_values_provided_by_cloning_callback) {
|
||||
config->setCloneNodeCallback(cloneNode);
|
||||
|
||||
yoga::Node node{}, owner{};
|
||||
YGNode node{}, owner{};
|
||||
auto clone = config->cloneNode(&node, &owner, 0, nullptr);
|
||||
|
||||
ASSERT_EQ(clone, &clonedNode);
|
||||
@@ -41,7 +41,7 @@ TEST_F(
|
||||
falls_back_to_regular_cloning_if_callback_returns_null) {
|
||||
config->setCloneNodeCallback(doNotClone);
|
||||
|
||||
yoga::Node node{}, owner{};
|
||||
YGNode node{}, owner{};
|
||||
auto clone = config->cloneNode(&node, &owner, 0, nullptr);
|
||||
|
||||
ASSERT_NE(clone, nullptr);
|
||||
@@ -53,7 +53,7 @@ TEST_F(ConfigCloningTest, can_clone_with_context) {
|
||||
return (YGNodeRef) context;
|
||||
});
|
||||
|
||||
yoga::Node node{}, owner{}, clone{};
|
||||
YGNode node{}, owner{}, clone{};
|
||||
ASSERT_EQ(config->cloneNode(&node, &owner, 0, &clone), &clone);
|
||||
}
|
||||
|
||||
@@ -65,4 +65,4 @@ void ConfigCloningTest::TearDown() {
|
||||
config.reset();
|
||||
}
|
||||
|
||||
yoga::Node ConfigCloningTest::clonedNode = {};
|
||||
YGNode ConfigCloningTest::clonedNode = {};
|
||||
|
Reference in New Issue
Block a user