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:
Nick Gerleman
2023-01-09 13:59:19 -08:00
committed by Facebook GitHub Bot
parent 9808358e08
commit 83cef5b12f
11 changed files with 55 additions and 70 deletions

View File

@@ -57,8 +57,8 @@ TEST(YogaTest, rounding_feature_with_custom_measure_func_floor) {
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL);
ASSERT_FLOAT_EQ(10.2, YGNodeLayoutGetWidth(root_child0));
ASSERT_FLOAT_EQ(10.2, YGNodeLayoutGetHeight(root_child0));
ASSERT_FLOAT_EQ(10.2f, YGNodeLayoutGetWidth(root_child0));
ASSERT_FLOAT_EQ(10.2f, YGNodeLayoutGetHeight(root_child0));
YGConfigSetPointScaleFactor(config, 1.0f);