From 736eea146923b22f2cafe730cffcef436cb2766c Mon Sep 17 00:00:00 2001 From: Brandon Thetford Date: Sun, 25 Feb 2024 20:52:15 -0700 Subject: [PATCH] Fix this test for release builds --- UnitTests/Views/WindowTests.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/UnitTests/Views/WindowTests.cs b/UnitTests/Views/WindowTests.cs index d69a8b65f..83e4b0822 100644 --- a/UnitTests/Views/WindowTests.cs +++ b/UnitTests/Views/WindowTests.cs @@ -160,10 +160,11 @@ public class WindowTests Assert.Equal (LayoutStyle.Absolute, windowWithFrameRectEmpty.LayoutStyle); // TODO: Fix things so that this works in release and debug // BUG: This also looks like it might be unintended behavior. + // Can actually also be removed, since the tests below make it redundant. #if DEBUG Assert.Equal ($"Window(title){windowWithFrameRectEmpty.Frame}", windowWithFrameRectEmpty.ToString ()); #else - Assert.Equal ("Window()(0,0,0,0)", windowWithFrameRectEmpty.ToString ()); + Assert.Equal ($"Window(){windowWithFrameRectEmpty.Frame}", windowWithFrameRectEmpty.ToString ()); #endif Assert.True (windowWithFrameRectEmpty.CanFocus); Assert.False (windowWithFrameRectEmpty.HasFocus); @@ -196,12 +197,12 @@ public class WindowTests #if DEBUG Assert.Equal ($"Window(title){windowWithFrame1234.Frame}", windowWithFrame1234.ToString ()); #else - Assert.Equal ("Window()(1,2,3,4)", windowWithFrame1234.ToString ()); + Assert.Equal ($"Window(){windowWithFrame1234.Frame}", windowWithFrame1234.ToString ()); #endif Assert.True (windowWithFrame1234.CanFocus); Assert.False (windowWithFrame1234.HasFocus); - Assert.Equal (new Rectangle (0, 0, 1, 2), windowWithFrame1234.Bounds); - Assert.Equal (new Rectangle (1, 2, 3, 4), windowWithFrame1234.Frame); + Assert.Equal (new (0, 0, 1, 2), windowWithFrame1234.Bounds); + Assert.Equal (new (1, 2, 3, 4), windowWithFrame1234.Frame); Assert.Null (windowWithFrame1234.Focused); Assert.NotNull (windowWithFrame1234.ColorScheme); Assert.Equal (1, windowWithFrame1234.X);