changed unittests to use units

This commit is contained in:
Lukas Woehrl
2016-12-11 16:43:46 +01:00
parent d950cf3d10
commit 8fbf1ddecb
14 changed files with 492 additions and 492 deletions

View File

@@ -14,11 +14,11 @@
TEST(YogaTest, align_items_stretch) {
const YGNodeRef root = YGNodeNew();
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 100);
YGNodeStyleSetWidthWithUnit(root, YGPx(100));
YGNodeStyleSetHeightWithUnit(root, YGPx(100));
const YGNodeRef root_child0 = YGNodeNew();
YGNodeStyleSetHeight(root_child0, 10);
YGNodeStyleSetHeightWithUnit(root_child0, YGPx(10));
YGNodeInsertChild(root, root_child0, 0);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
@@ -50,12 +50,12 @@ TEST(YogaTest, align_items_stretch) {
TEST(YogaTest, align_items_center) {
const YGNodeRef root = YGNodeNew();
YGNodeStyleSetAlignItems(root, YGAlignCenter);
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 100);
YGNodeStyleSetWidthWithUnit(root, YGPx(100));
YGNodeStyleSetHeightWithUnit(root, YGPx(100));
const YGNodeRef root_child0 = YGNodeNew();
YGNodeStyleSetWidth(root_child0, 10);
YGNodeStyleSetHeight(root_child0, 10);
YGNodeStyleSetWidthWithUnit(root_child0, YGPx(10));
YGNodeStyleSetHeightWithUnit(root_child0, YGPx(10));
YGNodeInsertChild(root, root_child0, 0);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
@@ -87,12 +87,12 @@ TEST(YogaTest, align_items_center) {
TEST(YogaTest, align_items_flex_start) {
const YGNodeRef root = YGNodeNew();
YGNodeStyleSetAlignItems(root, YGAlignFlexStart);
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 100);
YGNodeStyleSetWidthWithUnit(root, YGPx(100));
YGNodeStyleSetHeightWithUnit(root, YGPx(100));
const YGNodeRef root_child0 = YGNodeNew();
YGNodeStyleSetWidth(root_child0, 10);
YGNodeStyleSetHeight(root_child0, 10);
YGNodeStyleSetWidthWithUnit(root_child0, YGPx(10));
YGNodeStyleSetHeightWithUnit(root_child0, YGPx(10));
YGNodeInsertChild(root, root_child0, 0);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);
@@ -124,12 +124,12 @@ TEST(YogaTest, align_items_flex_start) {
TEST(YogaTest, align_items_flex_end) {
const YGNodeRef root = YGNodeNew();
YGNodeStyleSetAlignItems(root, YGAlignFlexEnd);
YGNodeStyleSetWidth(root, 100);
YGNodeStyleSetHeight(root, 100);
YGNodeStyleSetWidthWithUnit(root, YGPx(100));
YGNodeStyleSetHeightWithUnit(root, YGPx(100));
const YGNodeRef root_child0 = YGNodeNew();
YGNodeStyleSetWidth(root_child0, 10);
YGNodeStyleSetHeight(root_child0, 10);
YGNodeStyleSetWidthWithUnit(root_child0, YGPx(10));
YGNodeStyleSetHeightWithUnit(root_child0, YGPx(10));
YGNodeInsertChild(root, root_child0, 0);
YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR);