Fixup UTs for MSVC and Release Mode
Summary: This fixes incompatibility with MSVC in /W3 (designated initializers, precision loss) along with guarding tests which will only pass in DEBUG builds Reviewed By: cortinico Differential Revision: D42406531 fbshipit-source-id: 2c0d59678f76decf9b9b4d91a7c9ec12136ca1b9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9808358e08
commit
83cef5b12f
@@ -22,10 +22,7 @@ static YGSize _measure1(
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGMeasureMode heightMode) {
|
||||
return YGSize{
|
||||
.width = 42,
|
||||
.height = 50,
|
||||
};
|
||||
return YGSize{42, 50};
|
||||
}
|
||||
|
||||
static YGSize _measure2(
|
||||
@@ -34,10 +31,7 @@ static YGSize _measure2(
|
||||
YGMeasureMode widthMode,
|
||||
float height,
|
||||
YGMeasureMode heightMode) {
|
||||
return YGSize{
|
||||
.width = 279,
|
||||
.height = 126,
|
||||
};
|
||||
return YGSize{279, 126};
|
||||
}
|
||||
|
||||
static YGNodeRef createYGNode(
|
||||
@@ -51,8 +45,8 @@ static YGNodeRef createYGNode(
|
||||
if (alignBaseline) {
|
||||
YGNodeStyleSetAlignItems(node, YGAlignBaseline);
|
||||
}
|
||||
YGNodeStyleSetWidth(node, width);
|
||||
YGNodeStyleSetHeight(node, height);
|
||||
YGNodeStyleSetWidth(node, (float) width);
|
||||
YGNodeStyleSetHeight(node, (float) height);
|
||||
return node;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user