Added bool config to YGConfig to configure using web defaults
Summary: Added bool config to YGConfig to configure using web defaults. See #445. Closes https://github.com/facebook/yoga/pull/449 Reviewed By: astreet Differential Revision: D4642272 Pulled By: emilsjolander fbshipit-source-id: 4f35bd17b7f764f42295052a4a8b4ae46c192d7e
This commit is contained in:
committed by
Facebook Github Bot
parent
a706f4c97c
commit
62f47190fb
@@ -90,3 +90,16 @@ TEST(YogaTest, assert_default_values) {
|
||||
|
||||
YGNodeFreeRecursive(root);
|
||||
}
|
||||
|
||||
TEST(YogaTest, assert_webdefault_values) {
|
||||
YGConfig * config = YGConfigNew();
|
||||
YGConfigSetUseWebDefaults(config, true);
|
||||
const YGNodeRef root = YGNodeNewWithConfig(config);
|
||||
|
||||
ASSERT_EQ(YGFlexDirectionRow, YGNodeStyleGetFlexDirection(root));
|
||||
ASSERT_EQ(YGAlignStretch, YGNodeStyleGetAlignContent(root));
|
||||
ASSERT_FLOAT_EQ(1.0f, YGNodeStyleGetFlexShrink(root));
|
||||
|
||||
YGNodeFreeRecursive(root);
|
||||
YGConfigFree(config);
|
||||
}
|
||||
|
Reference in New Issue
Block a user