Rename enums
Summary: new name, start by renaming enums Differential Revision: D4244360 fbshipit-source-id: c9fcbdd231098c9ff230a6055676bbc7cbd11001
This commit is contained in:
committed by
Facebook Github Bot
parent
07cf47baad
commit
42b6f6b6e5
@@ -14,18 +14,18 @@
|
||||
|
||||
TEST(CSSLayoutTest, padding_no_size) {
|
||||
const CSSNodeRef root = CSSNodeNew();
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeLeft, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeTop, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeRight, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeBottom, 10);
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionLTR);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeLeft, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeTop, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeRight, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeBottom, 10);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
ASSERT_FLOAT_EQ(20, CSSNodeLayoutGetWidth(root));
|
||||
ASSERT_FLOAT_EQ(20, CSSNodeLayoutGetHeight(root));
|
||||
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionRTL);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
@@ -37,16 +37,16 @@ TEST(CSSLayoutTest, padding_no_size) {
|
||||
|
||||
TEST(CSSLayoutTest, padding_container_match_child) {
|
||||
const CSSNodeRef root = CSSNodeNew();
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeLeft, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeTop, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeRight, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeBottom, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeLeft, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeTop, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeRight, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeBottom, 10);
|
||||
|
||||
const CSSNodeRef root_child0 = CSSNodeNew();
|
||||
CSSNodeStyleSetWidth(root_child0, 10);
|
||||
CSSNodeStyleSetHeight(root_child0, 10);
|
||||
CSSNodeInsertChild(root, root_child0, 0);
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionLTR);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
@@ -58,7 +58,7 @@ TEST(CSSLayoutTest, padding_container_match_child) {
|
||||
ASSERT_FLOAT_EQ(10, CSSNodeLayoutGetWidth(root_child0));
|
||||
ASSERT_FLOAT_EQ(10, CSSNodeLayoutGetHeight(root_child0));
|
||||
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionRTL);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
@@ -75,10 +75,10 @@ TEST(CSSLayoutTest, padding_container_match_child) {
|
||||
|
||||
TEST(CSSLayoutTest, padding_flex_child) {
|
||||
const CSSNodeRef root = CSSNodeNew();
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeLeft, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeTop, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeRight, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeBottom, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeLeft, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeTop, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeRight, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeBottom, 10);
|
||||
CSSNodeStyleSetWidth(root, 100);
|
||||
CSSNodeStyleSetHeight(root, 100);
|
||||
|
||||
@@ -86,7 +86,7 @@ TEST(CSSLayoutTest, padding_flex_child) {
|
||||
CSSNodeStyleSetFlexGrow(root_child0, 1);
|
||||
CSSNodeStyleSetWidth(root_child0, 10);
|
||||
CSSNodeInsertChild(root, root_child0, 0);
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionLTR);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
@@ -98,7 +98,7 @@ TEST(CSSLayoutTest, padding_flex_child) {
|
||||
ASSERT_FLOAT_EQ(10, CSSNodeLayoutGetWidth(root_child0));
|
||||
ASSERT_FLOAT_EQ(80, CSSNodeLayoutGetHeight(root_child0));
|
||||
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionRTL);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
@@ -115,17 +115,17 @@ TEST(CSSLayoutTest, padding_flex_child) {
|
||||
|
||||
TEST(CSSLayoutTest, padding_stretch_child) {
|
||||
const CSSNodeRef root = CSSNodeNew();
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeLeft, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeTop, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeRight, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeBottom, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeLeft, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeTop, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeRight, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeBottom, 10);
|
||||
CSSNodeStyleSetWidth(root, 100);
|
||||
CSSNodeStyleSetHeight(root, 100);
|
||||
|
||||
const CSSNodeRef root_child0 = CSSNodeNew();
|
||||
CSSNodeStyleSetHeight(root_child0, 10);
|
||||
CSSNodeInsertChild(root, root_child0, 0);
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionLTR);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
@@ -137,7 +137,7 @@ TEST(CSSLayoutTest, padding_stretch_child) {
|
||||
ASSERT_FLOAT_EQ(80, CSSNodeLayoutGetWidth(root_child0));
|
||||
ASSERT_FLOAT_EQ(10, CSSNodeLayoutGetHeight(root_child0));
|
||||
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionRTL);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
@@ -154,11 +154,11 @@ TEST(CSSLayoutTest, padding_stretch_child) {
|
||||
|
||||
TEST(CSSLayoutTest, padding_center_child) {
|
||||
const CSSNodeRef root = CSSNodeNew();
|
||||
CSSNodeStyleSetJustifyContent(root, CSSJustifyCenter);
|
||||
CSSNodeStyleSetAlignItems(root, CSSAlignCenter);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeStart, 10);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeEnd, 20);
|
||||
CSSNodeStyleSetPadding(root, CSSEdgeBottom, 20);
|
||||
CSSNodeStyleSetJustifyContent(root, YGJustifyCenter);
|
||||
CSSNodeStyleSetAlignItems(root, YGAlignCenter);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeStart, 10);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeEnd, 20);
|
||||
CSSNodeStyleSetPadding(root, YGEdgeBottom, 20);
|
||||
CSSNodeStyleSetWidth(root, 100);
|
||||
CSSNodeStyleSetHeight(root, 100);
|
||||
|
||||
@@ -166,7 +166,7 @@ TEST(CSSLayoutTest, padding_center_child) {
|
||||
CSSNodeStyleSetWidth(root_child0, 10);
|
||||
CSSNodeStyleSetHeight(root_child0, 10);
|
||||
CSSNodeInsertChild(root, root_child0, 0);
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionLTR);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
@@ -178,7 +178,7 @@ TEST(CSSLayoutTest, padding_center_child) {
|
||||
ASSERT_FLOAT_EQ(10, CSSNodeLayoutGetWidth(root_child0));
|
||||
ASSERT_FLOAT_EQ(10, CSSNodeLayoutGetHeight(root_child0));
|
||||
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionRTL);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
@@ -195,20 +195,20 @@ TEST(CSSLayoutTest, padding_center_child) {
|
||||
|
||||
TEST(CSSLayoutTest, child_with_padding_align_end) {
|
||||
const CSSNodeRef root = CSSNodeNew();
|
||||
CSSNodeStyleSetJustifyContent(root, CSSJustifyFlexEnd);
|
||||
CSSNodeStyleSetAlignItems(root, CSSAlignFlexEnd);
|
||||
CSSNodeStyleSetJustifyContent(root, YGJustifyFlexEnd);
|
||||
CSSNodeStyleSetAlignItems(root, YGAlignFlexEnd);
|
||||
CSSNodeStyleSetWidth(root, 200);
|
||||
CSSNodeStyleSetHeight(root, 200);
|
||||
|
||||
const CSSNodeRef root_child0 = CSSNodeNew();
|
||||
CSSNodeStyleSetPadding(root_child0, CSSEdgeLeft, 20);
|
||||
CSSNodeStyleSetPadding(root_child0, CSSEdgeTop, 20);
|
||||
CSSNodeStyleSetPadding(root_child0, CSSEdgeRight, 20);
|
||||
CSSNodeStyleSetPadding(root_child0, CSSEdgeBottom, 20);
|
||||
CSSNodeStyleSetPadding(root_child0, YGEdgeLeft, 20);
|
||||
CSSNodeStyleSetPadding(root_child0, YGEdgeTop, 20);
|
||||
CSSNodeStyleSetPadding(root_child0, YGEdgeRight, 20);
|
||||
CSSNodeStyleSetPadding(root_child0, YGEdgeBottom, 20);
|
||||
CSSNodeStyleSetWidth(root_child0, 100);
|
||||
CSSNodeStyleSetHeight(root_child0, 100);
|
||||
CSSNodeInsertChild(root, root_child0, 0);
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionLTR);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
@@ -220,7 +220,7 @@ TEST(CSSLayoutTest, child_with_padding_align_end) {
|
||||
ASSERT_FLOAT_EQ(100, CSSNodeLayoutGetWidth(root_child0));
|
||||
ASSERT_FLOAT_EQ(100, CSSNodeLayoutGetHeight(root_child0));
|
||||
|
||||
CSSNodeCalculateLayout(root, CSSUndefined, CSSUndefined, CSSDirectionRTL);
|
||||
CSSNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionRTL);
|
||||
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetLeft(root));
|
||||
ASSERT_FLOAT_EQ(0, CSSNodeLayoutGetTop(root));
|
||||
|
Reference in New Issue
Block a user