remove explicit .Px() from c# unittests

This commit is contained in:
Lukas Woehrl
2016-12-23 23:26:48 +01:00
parent 5304040161
commit b3752efd05
15 changed files with 519 additions and 521 deletions

View File

@@ -21,12 +21,12 @@ namespace Facebook.Yoga
public void Test_flex_basis_flex_grow_column()
{
YogaNode root = new YogaNode();
root.Width = 100.Px();
root.Height = 100.Px();
root.Width = 100;
root.Height = 100;
YogaNode root_child0 = new YogaNode();
root_child0.FlexGrow = 1;
root_child0.FlexBasis = 50.Px();
root_child0.FlexBasis = 50;
root.Insert(0, root_child0);
YogaNode root_child1 = new YogaNode();
@@ -74,12 +74,12 @@ namespace Facebook.Yoga
{
YogaNode root = new YogaNode();
root.FlexDirection = YogaFlexDirection.Row;
root.Width = 100.Px();
root.Height = 100.Px();
root.Width = 100;
root.Height = 100;
YogaNode root_child0 = new YogaNode();
root_child0.FlexGrow = 1;
root_child0.FlexBasis = 50.Px();
root_child0.FlexBasis = 50;
root.Insert(0, root_child0);
YogaNode root_child1 = new YogaNode();
@@ -126,16 +126,16 @@ namespace Facebook.Yoga
public void Test_flex_basis_flex_shrink_column()
{
YogaNode root = new YogaNode();
root.Width = 100.Px();
root.Height = 100.Px();
root.Width = 100;
root.Height = 100;
YogaNode root_child0 = new YogaNode();
root_child0.FlexShrink = 1;
root_child0.FlexBasis = 100.Px();
root_child0.FlexBasis = 100;
root.Insert(0, root_child0);
YogaNode root_child1 = new YogaNode();
root_child1.FlexBasis = 50.Px();
root_child1.FlexBasis = 50;
root.Insert(1, root_child1);
root.StyleDirection = YogaDirection.LTR;
root.CalculateLayout();
@@ -179,16 +179,16 @@ namespace Facebook.Yoga
{
YogaNode root = new YogaNode();
root.FlexDirection = YogaFlexDirection.Row;
root.Width = 100.Px();
root.Height = 100.Px();
root.Width = 100;
root.Height = 100;
YogaNode root_child0 = new YogaNode();
root_child0.FlexShrink = 1;
root_child0.FlexBasis = 100.Px();
root_child0.FlexBasis = 100;
root.Insert(0, root_child0);
YogaNode root_child1 = new YogaNode();
root_child1.FlexBasis = 50.Px();
root_child1.FlexBasis = 50;
root.Insert(1, root_child1);
root.StyleDirection = YogaDirection.LTR;
root.CalculateLayout();
@@ -231,22 +231,22 @@ namespace Facebook.Yoga
public void Test_flex_shrink_to_zero()
{
YogaNode root = new YogaNode();
root.Height = 75.Px();
root.Height = 75;
YogaNode root_child0 = new YogaNode();
root_child0.Width = 50.Px();
root_child0.Height = 50.Px();
root_child0.Width = 50;
root_child0.Height = 50;
root.Insert(0, root_child0);
YogaNode root_child1 = new YogaNode();
root_child1.FlexShrink = 1;
root_child1.Width = 50.Px();
root_child1.Height = 50.Px();
root_child1.Width = 50;
root_child1.Height = 50;
root.Insert(1, root_child1);
YogaNode root_child2 = new YogaNode();
root_child2.Width = 50.Px();
root_child2.Height = 50.Px();
root_child2.Width = 50;
root_child2.Height = 50;
root.Insert(2, root_child2);
root.StyleDirection = YogaDirection.LTR;
root.CalculateLayout();
@@ -299,23 +299,23 @@ namespace Facebook.Yoga
public void Test_flex_basis_overrides_main_size()
{
YogaNode root = new YogaNode();
root.Width = 100.Px();
root.Height = 100.Px();
root.Width = 100;
root.Height = 100;
YogaNode root_child0 = new YogaNode();
root_child0.FlexGrow = 1;
root_child0.FlexBasis = 50.Px();
root_child0.Height = 20.Px();
root_child0.FlexBasis = 50;
root_child0.Height = 20;
root.Insert(0, root_child0);
YogaNode root_child1 = new YogaNode();
root_child1.FlexGrow = 1;
root_child1.Height = 10.Px();
root_child1.Height = 10;
root.Insert(1, root_child1);
YogaNode root_child2 = new YogaNode();
root_child2.FlexGrow = 1;
root_child2.Height = 10.Px();
root_child2.Height = 10;
root.Insert(2, root_child2);
root.StyleDirection = YogaDirection.LTR;
root.CalculateLayout();
@@ -368,8 +368,8 @@ namespace Facebook.Yoga
public void Test_flex_grow_shrink_at_most()
{
YogaNode root = new YogaNode();
root.Width = 100.Px();
root.Height = 100.Px();
root.Width = 100;
root.Height = 100;
YogaNode root_child0 = new YogaNode();
root.Insert(0, root_child0);