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,15 +21,15 @@ namespace Facebook.Yoga
public void Test_absolute_layout_width_height_start_top()
{
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.PositionType = YogaPositionType.Absolute;
root_child0.SetPosition(YogaEdge.Start, 10.Px());
root_child0.SetPosition(YogaEdge.Top, 10.Px());
root_child0.Width = 10.Px();
root_child0.Height = 10.Px();
root_child0.SetPosition(YogaEdge.Start, 10);
root_child0.SetPosition(YogaEdge.Top, 10);
root_child0.Width = 10;
root_child0.Height = 10;
root.Insert(0, root_child0);
root.StyleDirection = YogaDirection.LTR;
root.CalculateLayout();
@@ -62,15 +62,15 @@ namespace Facebook.Yoga
public void Test_absolute_layout_width_height_end_bottom()
{
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.PositionType = YogaPositionType.Absolute;
root_child0.SetPosition(YogaEdge.End, 10.Px());
root_child0.SetPosition(YogaEdge.Bottom, 10.Px());
root_child0.Width = 10.Px();
root_child0.Height = 10.Px();
root_child0.SetPosition(YogaEdge.End, 10);
root_child0.SetPosition(YogaEdge.Bottom, 10);
root_child0.Width = 10;
root_child0.Height = 10;
root.Insert(0, root_child0);
root.StyleDirection = YogaDirection.LTR;
root.CalculateLayout();
@@ -103,15 +103,15 @@ namespace Facebook.Yoga
public void Test_absolute_layout_start_top_end_bottom()
{
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.PositionType = YogaPositionType.Absolute;
root_child0.SetPosition(YogaEdge.Start, 10.Px());
root_child0.SetPosition(YogaEdge.Top, 10.Px());
root_child0.SetPosition(YogaEdge.End, 10.Px());
root_child0.SetPosition(YogaEdge.Bottom, 10.Px());
root_child0.SetPosition(YogaEdge.Start, 10);
root_child0.SetPosition(YogaEdge.Top, 10);
root_child0.SetPosition(YogaEdge.End, 10);
root_child0.SetPosition(YogaEdge.Bottom, 10);
root.Insert(0, root_child0);
root.StyleDirection = YogaDirection.LTR;
root.CalculateLayout();
@@ -144,17 +144,17 @@ namespace Facebook.Yoga
public void Test_absolute_layout_width_height_start_top_end_bottom()
{
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.PositionType = YogaPositionType.Absolute;
root_child0.SetPosition(YogaEdge.Start, 10.Px());
root_child0.SetPosition(YogaEdge.Top, 10.Px());
root_child0.SetPosition(YogaEdge.End, 10.Px());
root_child0.SetPosition(YogaEdge.Bottom, 10.Px());
root_child0.Width = 10.Px();
root_child0.Height = 10.Px();
root_child0.SetPosition(YogaEdge.Start, 10);
root_child0.SetPosition(YogaEdge.Top, 10);
root_child0.SetPosition(YogaEdge.End, 10);
root_child0.SetPosition(YogaEdge.Bottom, 10);
root_child0.Width = 10;
root_child0.Height = 10;
root.Insert(0, root_child0);
root.StyleDirection = YogaDirection.LTR;
root.CalculateLayout();
@@ -189,18 +189,18 @@ namespace Facebook.Yoga
YogaNode root = new YogaNode();
root.FlexDirection = YogaFlexDirection.Row;
root.Overflow = YogaOverflow.Hidden;
root.Width = 50.Px();
root.Height = 50.Px();
root.Width = 50;
root.Height = 50;
YogaNode root_child0 = new YogaNode();
root_child0.PositionType = YogaPositionType.Absolute;
root_child0.SetPosition(YogaEdge.Start, 0.Px());
root_child0.SetPosition(YogaEdge.Top, 0.Px());
root_child0.SetPosition(YogaEdge.Start, 0);
root_child0.SetPosition(YogaEdge.Top, 0);
root.Insert(0, root_child0);
YogaNode root_child0_child0 = new YogaNode();
root_child0_child0.Width = 100.Px();
root_child0_child0.Height = 100.Px();
root_child0_child0.Width = 100;
root_child0_child0.Height = 100;
root_child0.Insert(0, root_child0_child0);
root.StyleDirection = YogaDirection.LTR;
root.CalculateLayout();
@@ -243,35 +243,35 @@ namespace Facebook.Yoga
public void Test_absolute_layout_within_border()
{
YogaNode root = new YogaNode();
root.SetMargin(YogaEdge.Left, 10.Px());
root.SetMargin(YogaEdge.Top, 10.Px());
root.SetMargin(YogaEdge.Right, 10.Px());
root.SetMargin(YogaEdge.Bottom, 10.Px());
root.SetPadding(YogaEdge.Left, 10.Px());
root.SetPadding(YogaEdge.Top, 10.Px());
root.SetPadding(YogaEdge.Right, 10.Px());
root.SetPadding(YogaEdge.Bottom, 10.Px());
root.SetMargin(YogaEdge.Left, 10);
root.SetMargin(YogaEdge.Top, 10);
root.SetMargin(YogaEdge.Right, 10);
root.SetMargin(YogaEdge.Bottom, 10);
root.SetPadding(YogaEdge.Left, 10);
root.SetPadding(YogaEdge.Top, 10);
root.SetPadding(YogaEdge.Right, 10);
root.SetPadding(YogaEdge.Bottom, 10);
root.SetBorder(YogaEdge.Left, 10);
root.SetBorder(YogaEdge.Top, 10);
root.SetBorder(YogaEdge.Right, 10);
root.SetBorder(YogaEdge.Bottom, 10);
root.Width = 100.Px();
root.Height = 100.Px();
root.Width = 100;
root.Height = 100;
YogaNode root_child0 = new YogaNode();
root_child0.PositionType = YogaPositionType.Absolute;
root_child0.SetPosition(YogaEdge.Left, 0.Px());
root_child0.SetPosition(YogaEdge.Top, 0.Px());
root_child0.Width = 50.Px();
root_child0.Height = 50.Px();
root_child0.SetPosition(YogaEdge.Left, 0);
root_child0.SetPosition(YogaEdge.Top, 0);
root_child0.Width = 50;
root_child0.Height = 50;
root.Insert(0, root_child0);
YogaNode root_child1 = new YogaNode();
root_child1.PositionType = YogaPositionType.Absolute;
root_child1.SetPosition(YogaEdge.Right, 0.Px());
root_child1.SetPosition(YogaEdge.Bottom, 0.Px());
root_child1.Width = 50.Px();
root_child1.Height = 50.Px();
root_child1.SetPosition(YogaEdge.Right, 0);
root_child1.SetPosition(YogaEdge.Bottom, 0);
root_child1.Width = 50;
root_child1.Height = 50;
root.Insert(1, root_child1);
root.StyleDirection = YogaDirection.LTR;
root.CalculateLayout();