From 5524c8dedd5557c9fc83cc519d7ea9a60e2475fe Mon Sep 17 00:00:00 2001 From: Rui Marinho Date: Wed, 15 Feb 2017 23:02:18 +0000 Subject: [PATCH] [csharp] Fix tests --- .../Facebook.Yoga/YogaNodeSpacingTest.cs | 48 +++++++++---------- csharp/tests/Facebook.Yoga/YogaNodeTest.cs | 14 +++--- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/csharp/tests/Facebook.Yoga/YogaNodeSpacingTest.cs b/csharp/tests/Facebook.Yoga/YogaNodeSpacingTest.cs index d29b19e2..525dacc2 100644 --- a/csharp/tests/Facebook.Yoga/YogaNodeSpacingTest.cs +++ b/csharp/tests/Facebook.Yoga/YogaNodeSpacingTest.cs @@ -44,20 +44,20 @@ namespace Facebook.Yoga BorderRightWidth = 16, }; - Assert.AreEqual(1.Px(), node.Top); - Assert.AreEqual(2.Px(), node.Bottom); - Assert.AreEqual(3.Px(), node.Left); - Assert.AreEqual(4.Px(), node.Right); + Assert.AreEqual(1.Pt(), node.Top); + Assert.AreEqual(2.Pt(), node.Bottom); + Assert.AreEqual(3.Pt(), node.Left); + Assert.AreEqual(4.Pt(), node.Right); - Assert.AreEqual(5.Px(), node.MarginTop); - Assert.AreEqual(6.Px(), node.MarginBottom); - Assert.AreEqual(7.Px(), node.MarginLeft); - Assert.AreEqual(8.Px(), node.MarginRight); + Assert.AreEqual(5.Pt(), node.MarginTop); + Assert.AreEqual(6.Pt(), node.MarginBottom); + Assert.AreEqual(7.Pt(), node.MarginLeft); + Assert.AreEqual(8.Pt(), node.MarginRight); - Assert.AreEqual(9.Px(), node.PaddingTop); - Assert.AreEqual(10.Px(), node.PaddingBottom); - Assert.AreEqual(11.Px(), node.PaddingLeft); - Assert.AreEqual(12.Px(), node.PaddingRight); + Assert.AreEqual(9.Pt(), node.PaddingTop); + Assert.AreEqual(10.Pt(), node.PaddingBottom); + Assert.AreEqual(11.Pt(), node.PaddingLeft); + Assert.AreEqual(12.Pt(), node.PaddingRight); Assert.AreEqual(13, node.BorderTopWidth); Assert.AreEqual(14, node.BorderBottomWidth); @@ -90,20 +90,20 @@ namespace Facebook.Yoga node.BorderLeftWidth = 15; node.BorderRightWidth = 16; - Assert.AreEqual(1.Px(), node.Top); - Assert.AreEqual(2.Px(), node.Bottom); - Assert.AreEqual(3.Px(), node.Left); - Assert.AreEqual(4.Px(), node.Right); + Assert.AreEqual(1.Pt(), node.Top); + Assert.AreEqual(2.Pt(), node.Bottom); + Assert.AreEqual(3.Pt(), node.Left); + Assert.AreEqual(4.Pt(), node.Right); - Assert.AreEqual(5.Px(), node.MarginTop); - Assert.AreEqual(6.Px(), node.MarginBottom); - Assert.AreEqual(7.Px(), node.MarginLeft); - Assert.AreEqual(8.Px(), node.MarginRight); + Assert.AreEqual(5.Pt(), node.MarginTop); + Assert.AreEqual(6.Pt(), node.MarginBottom); + Assert.AreEqual(7.Pt(), node.MarginLeft); + Assert.AreEqual(8.Pt(), node.MarginRight); - Assert.AreEqual(9.Px(), node.PaddingTop); - Assert.AreEqual(10.Px(), node.PaddingBottom); - Assert.AreEqual(11.Px(), node.PaddingLeft); - Assert.AreEqual(12.Px(), node.PaddingRight); + Assert.AreEqual(9.Pt(), node.PaddingTop); + Assert.AreEqual(10.Pt(), node.PaddingBottom); + Assert.AreEqual(11.Pt(), node.PaddingLeft); + Assert.AreEqual(12.Pt(), node.PaddingRight); Assert.AreEqual(13, node.BorderTopWidth); Assert.AreEqual(14, node.BorderBottomWidth); diff --git a/csharp/tests/Facebook.Yoga/YogaNodeTest.cs b/csharp/tests/Facebook.Yoga/YogaNodeTest.cs index 291fb4af..ebffaf23 100644 --- a/csharp/tests/Facebook.Yoga/YogaNodeTest.cs +++ b/csharp/tests/Facebook.Yoga/YogaNodeTest.cs @@ -273,7 +273,7 @@ namespace Facebook.Yoga node1.MaxHeight = 100; node0.CopyStyle(node1); - Assert.AreEqual(100.Px(), node0.MaxHeight); + Assert.AreEqual(100.Pt(), node0.MaxHeight); } [Test] @@ -283,27 +283,27 @@ namespace Facebook.Yoga node0.MaxWidth = 80; YogaNode node1 = new YogaNode(node0); - Assert.AreEqual(80.Px(), node1.MaxWidth); + Assert.AreEqual(80.Pt(), node1.MaxWidth); YogaNode node2 = new YogaNode(node1) { MaxHeight = 90, }; - Assert.AreEqual(80.Px(), node2.MaxWidth); - Assert.AreEqual(90.Px(), node2.MaxHeight); + Assert.AreEqual(80.Pt(), node2.MaxWidth); + Assert.AreEqual(90.Pt(), node2.MaxHeight); YogaNode node3 = new YogaNode(node0) { MaxWidth = 100, }; - Assert.AreEqual(100.Px(), node3.MaxWidth); + Assert.AreEqual(100.Pt(), node3.MaxWidth); YogaNode node4 = new YogaNode(node2) { MaxWidth = 100, }; - Assert.AreEqual(100.Px(), node4.MaxWidth); - Assert.AreEqual(90.Px(), node4.MaxHeight); + Assert.AreEqual(100.Pt(), node4.MaxWidth); + Assert.AreEqual(90.Pt(), node4.MaxHeight); } private void ForceGC()