/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ // clang-format off // @generated by gentest/gentest.rb from gentest/fixtures/YGStaticPositionTest.html #include #include TEST(YogaTest, static_position_insets_have_no_effect) { GTEST_SKIP(); const YGConfigRef config = YGConfigNew(); YGConfigSetExperimentalFeatureEnabled(config, YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge, true); const YGNodeRef root = YGNodeNewWithConfig(config); YGNodeStyleSetPosition(root, YGEdgeLeft, 50); YGNodeStyleSetPosition(root, YGEdgeTop, 50); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetLeft(root)); ASSERT_FLOAT_EQ(0, YGNodeLayoutGetTop(root)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetWidth(root)); ASSERT_FLOAT_EQ(100, YGNodeLayoutGetHeight(root)); YGNodeFreeRecursive(root); YGConfigFree(config); }