Slightly de-couple these as well

This commit is contained in:
Brandon Thetford
2024-02-20 18:50:24 -07:00
parent 8252203c75
commit 93f21b8edd
2 changed files with 13 additions and 13 deletions

View File

@@ -26,7 +26,7 @@ public class ScrollBarViewTests
Assert.Equal (1, _scrollBar.Bounds.Width);
Assert.Equal (
"Combine(View(Height,HostView()(0,0,80,25))-Absolute(1))",
$"Combine(View(Height,HostView(){_hostView.Frame})-Absolute(1))",
_scrollBar.Height.ToString ()
);
Assert.Equal (24, _scrollBar.Bounds.Height);
@@ -34,7 +34,7 @@ public class ScrollBarViewTests
Assert.True (_scrollBar.OtherScrollBarView.Visible);
Assert.Equal (
"Combine(View(Width,HostView()(0,0,80,25))-Absolute(1))",
$"Combine(View(Width,HostView(){_hostView.Frame})-Absolute(1))",
_scrollBar.OtherScrollBarView.Width.ToString ()
);
Assert.Equal (79, _scrollBar.OtherScrollBarView.Bounds.Width);
@@ -49,7 +49,7 @@ public class ScrollBarViewTests
Assert.Equal (1, _scrollBar.Bounds.Width);
Assert.Equal (
"Combine(View(Height,HostView()(0,0,80,25))-Absolute(1))",
$"Combine(View(Height,HostView(){_hostView.Frame})-Absolute(1))",
_scrollBar.Height.ToString ()
);
Assert.Equal (24, _scrollBar.Bounds.Height);
@@ -57,7 +57,7 @@ public class ScrollBarViewTests
Assert.True (_scrollBar.OtherScrollBarView.Visible);
Assert.Equal (
"View(Width,HostView()(0,0,80,25))",
$"View(Width,HostView(){_hostView.Frame})",
_scrollBar.OtherScrollBarView.Width.ToString ()
);
Assert.Equal (80, _scrollBar.OtherScrollBarView.Bounds.Width);
@@ -72,7 +72,7 @@ public class ScrollBarViewTests
Assert.Equal (1, _scrollBar.Bounds.Width);
Assert.Equal (
"Combine(View(Height,HostView()(0,0,80,25))-Absolute(1))",
$"Combine(View(Height,HostView(){_hostView.Frame})-Absolute(1))",
_scrollBar.Height.ToString ()
);
Assert.Equal (24, _scrollBar.Bounds.Height);
@@ -80,7 +80,7 @@ public class ScrollBarViewTests
Assert.False (_scrollBar.OtherScrollBarView.Visible);
Assert.Equal (
"View(Width,HostView()(0,0,80,25))",
$"View(Width,HostView(){_hostView.Frame})",
_scrollBar.OtherScrollBarView.Width.ToString ()
);
Assert.Equal (80, _scrollBar.OtherScrollBarView.Bounds.Width);
@@ -95,7 +95,7 @@ public class ScrollBarViewTests
Assert.Equal (1, _scrollBar.Bounds.Width);
Assert.Equal (
"View(Height,HostView()(0,0,80,25))",
$"View(Height,HostView(){_hostView.Frame})",
_scrollBar.Height.ToString ()
);
Assert.Equal (25, _scrollBar.Bounds.Height);
@@ -103,7 +103,7 @@ public class ScrollBarViewTests
Assert.False (_scrollBar.OtherScrollBarView.Visible);
Assert.Equal (
"View(Width,HostView()(0,0,80,25))",
$"View(Width,HostView(){_hostView.Frame})",
_scrollBar.OtherScrollBarView.Width.ToString ()
);
Assert.Equal (80, _scrollBar.OtherScrollBarView.Bounds.Width);
@@ -118,7 +118,7 @@ public class ScrollBarViewTests
Assert.Equal (1, _scrollBar.Bounds.Width);
Assert.Equal (
"Combine(View(Height,HostView()(0,0,80,25))-Absolute(1))",
$"Combine(View(Height,HostView(){_hostView.Frame})-Absolute(1))",
_scrollBar.Height.ToString ()
);
Assert.Equal (24, _scrollBar.Bounds.Height);
@@ -126,7 +126,7 @@ public class ScrollBarViewTests
Assert.True (_scrollBar.OtherScrollBarView.Visible);
Assert.Equal (
"Combine(View(Width,HostView()(0,0,80,25))-Absolute(1))",
$"Combine(View(Width,HostView(){_hostView.Frame})-Absolute(1))",
_scrollBar.OtherScrollBarView.Width.ToString ()
);
Assert.Equal (79, _scrollBar.OtherScrollBarView.Bounds.Width);

View File

@@ -132,7 +132,7 @@ public class WindowTests
Assert.Equal (LayoutStyle.Computed, defaultWindow.LayoutStyle);
// If there's no SuperView, Top, or Driver, the default Fill width is int.MaxValue
Assert.Equal ("Window()(0,0,2147483647,2147483647)", defaultWindow.ToString ());
Assert.Equal ($"Window(){defaultWindow.Frame}", defaultWindow.ToString ());
Assert.True (defaultWindow.CanFocus);
Assert.False (defaultWindow.HasFocus);
Assert.Equal (new Rectangle (0, 0, 2147483645, 2147483645), defaultWindow.Bounds);
@@ -161,7 +161,7 @@ public class WindowTests
// TODO: Fix things so that this works in release and debug
// BUG: This also looks like it might be unintended behavior.
#if DEBUG
Assert.Equal ("Window(title)(0,0,0,0)", windowWithFrameRectEmpty.ToString ());
Assert.Equal ($"Window(title){windowWithFrameRectEmpty.Frame}", windowWithFrameRectEmpty.ToString ());
#else
Assert.Equal ("Window()(0,0,0,0)", windowWithFrameRectEmpty.ToString ());
#endif
@@ -194,7 +194,7 @@ public class WindowTests
Assert.Equal (LayoutStyle.Absolute, windowWithFrame1234.LayoutStyle);
Assert.Equal (LayoutStyle.Absolute, windowWithFrame1234.LayoutStyle);
#if DEBUG
Assert.Equal ("Window(title)(1,2,3,4)", windowWithFrame1234.ToString ());
Assert.Equal ($"Window(title){windowWithFrame1234.Frame}", windowWithFrame1234.ToString ());
#else
Assert.Equal ("Window()(1,2,3,4)", windowWithFrame1234.ToString ());
#endif