update c# interop to use percentage
This commit is contained in:
@@ -21,16 +21,16 @@ namespace Facebook.Yoga
|
||||
public void Test_flex_basis_flex_grow_column()
|
||||
{
|
||||
YogaNode root = new YogaNode();
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
root.Width = 100.Px();
|
||||
root.Height = 100.Px();
|
||||
|
||||
YogaNode root_child0 = new YogaNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.FlexBasis = 50f;
|
||||
root_child0.FlexGrow = 1;
|
||||
root_child0.FlexBasis = 50.Px();
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child1 = new YogaNode();
|
||||
root_child1.FlexGrow = 1f;
|
||||
root_child1.FlexGrow = 1;
|
||||
root.Insert(1, root_child1);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -74,16 +74,16 @@ namespace Facebook.Yoga
|
||||
{
|
||||
YogaNode root = new YogaNode();
|
||||
root.FlexDirection = YogaFlexDirection.Row;
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
root.Width = 100.Px();
|
||||
root.Height = 100.Px();
|
||||
|
||||
YogaNode root_child0 = new YogaNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.FlexBasis = 50f;
|
||||
root_child0.FlexGrow = 1;
|
||||
root_child0.FlexBasis = 50.Px();
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child1 = new YogaNode();
|
||||
root_child1.FlexGrow = 1f;
|
||||
root_child1.FlexGrow = 1;
|
||||
root.Insert(1, root_child1);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -126,16 +126,16 @@ namespace Facebook.Yoga
|
||||
public void Test_flex_basis_flex_shrink_column()
|
||||
{
|
||||
YogaNode root = new YogaNode();
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
root.Width = 100.Px();
|
||||
root.Height = 100.Px();
|
||||
|
||||
YogaNode root_child0 = new YogaNode();
|
||||
root_child0.FlexShrink = 1f;
|
||||
root_child0.FlexBasis = 100f;
|
||||
root_child0.FlexShrink = 1;
|
||||
root_child0.FlexBasis = 100.Px();
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child1 = new YogaNode();
|
||||
root_child1.FlexBasis = 50f;
|
||||
root_child1.FlexBasis = 50.Px();
|
||||
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 = 100f;
|
||||
root.Height = 100f;
|
||||
root.Width = 100.Px();
|
||||
root.Height = 100.Px();
|
||||
|
||||
YogaNode root_child0 = new YogaNode();
|
||||
root_child0.FlexShrink = 1f;
|
||||
root_child0.FlexBasis = 100f;
|
||||
root_child0.FlexShrink = 1;
|
||||
root_child0.FlexBasis = 100.Px();
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child1 = new YogaNode();
|
||||
root_child1.FlexBasis = 50f;
|
||||
root_child1.FlexBasis = 50.Px();
|
||||
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 = 75f;
|
||||
root.Height = 75.Px();
|
||||
|
||||
YogaNode root_child0 = new YogaNode();
|
||||
root_child0.Width = 50f;
|
||||
root_child0.Height = 50f;
|
||||
root_child0.Width = 50.Px();
|
||||
root_child0.Height = 50.Px();
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child1 = new YogaNode();
|
||||
root_child1.FlexShrink = 1f;
|
||||
root_child1.Width = 50f;
|
||||
root_child1.Height = 50f;
|
||||
root_child1.FlexShrink = 1;
|
||||
root_child1.Width = 50.Px();
|
||||
root_child1.Height = 50.Px();
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
YogaNode root_child2 = new YogaNode();
|
||||
root_child2.Width = 50f;
|
||||
root_child2.Height = 50f;
|
||||
root_child2.Width = 50.Px();
|
||||
root_child2.Height = 50.Px();
|
||||
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 = 100f;
|
||||
root.Height = 100f;
|
||||
root.Width = 100.Px();
|
||||
root.Height = 100.Px();
|
||||
|
||||
YogaNode root_child0 = new YogaNode();
|
||||
root_child0.FlexGrow = 1f;
|
||||
root_child0.FlexBasis = 50f;
|
||||
root_child0.Height = 20f;
|
||||
root_child0.FlexGrow = 1;
|
||||
root_child0.FlexBasis = 50.Px();
|
||||
root_child0.Height = 20.Px();
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child1 = new YogaNode();
|
||||
root_child1.FlexGrow = 1f;
|
||||
root_child1.Height = 10f;
|
||||
root_child1.FlexGrow = 1;
|
||||
root_child1.Height = 10.Px();
|
||||
root.Insert(1, root_child1);
|
||||
|
||||
YogaNode root_child2 = new YogaNode();
|
||||
root_child2.FlexGrow = 1f;
|
||||
root_child2.Height = 10f;
|
||||
root_child2.FlexGrow = 1;
|
||||
root_child2.Height = 10.Px();
|
||||
root.Insert(2, root_child2);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
@@ -368,15 +368,15 @@ namespace Facebook.Yoga
|
||||
public void Test_flex_grow_shrink_at_most()
|
||||
{
|
||||
YogaNode root = new YogaNode();
|
||||
root.Width = 100f;
|
||||
root.Height = 100f;
|
||||
root.Width = 100.Px();
|
||||
root.Height = 100.Px();
|
||||
|
||||
YogaNode root_child0 = new YogaNode();
|
||||
root.Insert(0, root_child0);
|
||||
|
||||
YogaNode root_child0_child0 = new YogaNode();
|
||||
root_child0_child0.FlexGrow = 1f;
|
||||
root_child0_child0.FlexShrink = 1f;
|
||||
root_child0_child0.FlexGrow = 1;
|
||||
root_child0_child0.FlexShrink = 1;
|
||||
root_child0.Insert(0, root_child0_child0);
|
||||
root.StyleDirection = YogaDirection.LTR;
|
||||
root.CalculateLayout();
|
||||
|
Reference in New Issue
Block a user