From f0b2fb1820a368be7b3fb3d9d8edc7af8e080c7a Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Tue, 20 Feb 2024 18:13:34 -0700 Subject: [PATCH] Fix these tests the same way as the previous commit --- UnitTests/View/Layout/PosTests.cs | 12 ++++++------ UnitTests/View/ViewTests.cs | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/UnitTests/View/Layout/PosTests.cs b/UnitTests/View/Layout/PosTests.cs index 02345f3d8..04fbf674c 100644 --- a/UnitTests/View/Layout/PosTests.cs +++ b/UnitTests/View/Layout/PosTests.cs @@ -201,42 +201,42 @@ public class PosTests Pos pos = Pos.Left (v); Assert.Equal ( - "View(side=x,target=View(V)(0,0,0,0))", + $"View(side=x,target=View(V){v.Frame})", pos.ToString () ); pos = Pos.X (v); Assert.Equal ( - "View(side=x,target=View(V)(0,0,0,0))", + $"View(side=x,target=View(V){v.Frame})", pos.ToString () ); pos = Pos.Top (v); Assert.Equal ( - "View(side=y,target=View(V)(0,0,0,0))", + $"View(side=y,target=View(V){v.Frame})", pos.ToString () ); pos = Pos.Y (v); Assert.Equal ( - "View(side=y,target=View(V)(0,0,0,0))", + $"View(side=y,target=View(V){v.Frame})", pos.ToString () ); pos = Pos.Right (v); Assert.Equal ( - "View(side=right,target=View(V)(0,0,0,0))", + $"View(side=right,target=View(V){v.Frame})", pos.ToString () ); pos = Pos.Bottom (v); Assert.Equal ( - "View(side=bottom,target=View(V)(0,0,0,0))", + $"View(side=bottom,target=View(V){v.Frame})", pos.ToString () ); } diff --git a/UnitTests/View/ViewTests.cs b/UnitTests/View/ViewTests.cs index b1ed9add2..1f51695c0 100644 --- a/UnitTests/View/ViewTests.cs +++ b/UnitTests/View/ViewTests.cs @@ -1084,7 +1084,7 @@ At 0,0 var r = new View (); Assert.NotNull (r); Assert.Equal (LayoutStyle.Absolute, r.LayoutStyle); - Assert.Equal ("View()(0,0,0,0)", r.ToString ()); + Assert.Equal ($"View(){r.Bounds}", r.ToString ()); Assert.False (r.CanFocus); Assert.False (r.HasFocus); Assert.Equal (new Rectangle (0, 0, 0, 0), r.Bounds); @@ -1109,7 +1109,7 @@ At 0,0 r = new View { Frame = Rectangle.Empty }; Assert.NotNull (r); Assert.Equal (LayoutStyle.Absolute, r.LayoutStyle); - Assert.Equal ("View()(0,0,0,0)", r.ToString ()); + Assert.Equal ($"View(){r.Bounds}", r.ToString ()); Assert.False (r.CanFocus); Assert.False (r.HasFocus); Assert.Equal (new Rectangle (0, 0, 0, 0), r.Bounds); @@ -1134,7 +1134,7 @@ At 0,0 r = new View { Frame = new Rectangle (1, 2, 3, 4) }; Assert.NotNull (r); Assert.Equal (LayoutStyle.Absolute, r.LayoutStyle); - Assert.Equal ("View()(1,2,3,4)", r.ToString ()); + Assert.Equal ($"View(){r.Frame}", r.ToString ()); Assert.False (r.CanFocus); Assert.False (r.HasFocus); Assert.Equal (new Rectangle (0, 0, 3, 4), r.Bounds); @@ -1167,7 +1167,7 @@ At 0,0 r.BeginInit (); r.EndInit (); #if DEBUG - Assert.Equal ("View(Vertical View)(0,0,1,13)", r.ToString ()); + Assert.Equal ($"View(Vertical View){r.Bounds}", r.ToString ()); #else Assert.Equal ("View()(0,0,1,13)", r.ToString ()); #endif