Add default test for box sizing

Summary:
Had a mini heart attack thinking I set the default to content box. Wrote this to double check and it passed. Might as well check it in

Technically the default to BoxSizing.h is ContentBox, but in the style we override that. Regardless I switched that around so border box was the default.

Changelog: [Internal]

Differential Revision: D63802722
This commit is contained in:
Joe Vilches
2024-10-02 17:32:52 -07:00
committed by Facebook GitHub Bot
parent 84312c54a4
commit 9d5c9d539e
7 changed files with 24 additions and 13 deletions

View File

@@ -162,3 +162,14 @@ TEST(YogaTest, assert_legacy_stretch_behaviour) {
YGConfigFree(config);
}
TEST(YogaTest, assert_box_sizing_border_box) {
YGConfig* config = YGConfigNew();
YGNodeRef root = YGNodeNewWithConfig(config);
ASSERT_EQ(YGBoxSizingBorderBox, YGNodeStyleGetBoxSizing(root));
YGNodeFreeRecursive(root);
YGConfigFree(config);
}