Move YGLogger into YGConfig and associate YGNodeRef with log events
Summary: Moves the `YGLogger` into `YGConfig` and pass the `YGNodeRef` into the logger to be able to associate the log messages and assertions with the specific node. Tackles facebook/yoga#530 and facebook/yoga#446 Closes https://github.com/facebook/yoga/pull/531 Reviewed By: astreet Differential Revision: D4970149 Pulled By: emilsjolander fbshipit-source-id: b7fcdaa273143ea2fa35861620b2e4d79f04f0af
This commit is contained in:
committed by
Facebook Github Bot
parent
40eba60cf5
commit
91230ae177
@@ -70,27 +70,27 @@ TEST(YogaTest, dirty_propagation_only_if_prop_changed) {
|
||||
YGNodeFreeRecursive(root);
|
||||
}
|
||||
|
||||
TEST(YogaTest, dirty_mark_all_children_as_dirty_when_display_changes){
|
||||
TEST(YogaTest, dirty_mark_all_children_as_dirty_when_display_changes) {
|
||||
const YGNodeRef root = YGNodeNew();
|
||||
YGNodeStyleSetFlexDirection(root, YGFlexDirectionRow);
|
||||
YGNodeStyleSetHeight(root, 100);
|
||||
|
||||
|
||||
const YGNodeRef child0 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(child0, 1);
|
||||
const YGNodeRef child1 = YGNodeNew();
|
||||
YGNodeStyleSetFlexGrow(child1, 1);
|
||||
|
||||
|
||||
const YGNodeRef child1_child0 = YGNodeNew();
|
||||
const YGNodeRef child1_child0_child0 = YGNodeNew();
|
||||
YGNodeStyleSetWidth(child1_child0_child0, 8);
|
||||
YGNodeStyleSetHeight(child1_child0_child0, 16);
|
||||
|
||||
|
||||
YGNodeInsertChild(child1_child0, child1_child0_child0, 0);
|
||||
|
||||
|
||||
YGNodeInsertChild(child1, child1_child0, 0);
|
||||
YGNodeInsertChild(root, child0, 0);
|
||||
YGNodeInsertChild(root, child1, 0);
|
||||
|
||||
|
||||
YGNodeStyleSetDisplay(child0, YGDisplayFlex);
|
||||
YGNodeStyleSetDisplay(child1, YGDisplayNone);
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
@@ -114,7 +114,7 @@ TEST(YogaTest, dirty_mark_all_children_as_dirty_when_display_changes){
|
||||
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
ASSERT_FLOAT_EQ(8, YGNodeLayoutGetWidth(child1_child0_child0));
|
||||
ASSERT_FLOAT_EQ(16, YGNodeLayoutGetHeight(child1_child0_child0));
|
||||
|
||||
|
||||
YGNodeFreeRecursive(root);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user