mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fixes #3951. Add DimFuncWithView with a View dependency
This commit is contained in:
@@ -232,6 +232,7 @@ public class ButtonTests (ITestOutputHelper output)
|
||||
Assert.True (btn.CanFocus);
|
||||
|
||||
Application.Driver?.ClearContents ();
|
||||
btn.Layout ();
|
||||
btn.Draw ();
|
||||
|
||||
expected = @$"
|
||||
|
||||
@@ -14,7 +14,7 @@ public class ColorPicker16Tests
|
||||
|
||||
colorPicker.BeginInit ();
|
||||
colorPicker.EndInit ();
|
||||
colorPicker.LayoutSubViews ();
|
||||
colorPicker.Layout ();
|
||||
Assert.Equal (new (0, 0, 32, 4), colorPicker.Frame);
|
||||
}
|
||||
|
||||
|
||||
@@ -675,7 +675,7 @@ public class ColorPickerTests
|
||||
// Switch to HSV
|
||||
cp.Style.ColorModel = ColorModel.HSV;
|
||||
cp.ApplyStyleChanges ();
|
||||
|
||||
cp.Layout ();
|
||||
cp.Draw ();
|
||||
|
||||
ColorBar h = GetColorBar (cp, ColorPickerPart.Bar1);
|
||||
|
||||
@@ -1053,7 +1053,7 @@ e
|
||||
win.Add (label);
|
||||
win.BeginInit ();
|
||||
win.EndInit ();
|
||||
win.LayoutSubViews ();
|
||||
win.Layout ();
|
||||
win.Draw ();
|
||||
|
||||
Assert.Equal (5, text.Length);
|
||||
|
||||
@@ -2130,6 +2130,7 @@ wo
|
||||
Assert.True (menu.NewKeyDownEvent (menu.Key));
|
||||
Assert.True (menu.IsMenuOpen);
|
||||
View.SetClipToScreen ();
|
||||
top.Layout ();
|
||||
top.Draw ();
|
||||
DriverAssert.AssertDriverContentsAre (expectedMenu.ExpectedSubMenuOpen (0), output);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ public class ProgressBarTests
|
||||
var pb = new ProgressBar ();
|
||||
pb.BeginInit ();
|
||||
pb.EndInit ();
|
||||
|
||||
pb.Layout ();
|
||||
Assert.False (pb.CanFocus);
|
||||
Assert.Equal (0, pb.Fraction);
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ProgressBarTests
|
||||
|
||||
pb.BeginInit ();
|
||||
pb.EndInit ();
|
||||
pb.LayoutSubViews ();
|
||||
pb.Layout ();
|
||||
|
||||
for (var i = 0; i <= pb.Frame.Width; i++)
|
||||
{
|
||||
@@ -174,7 +174,7 @@ public class ProgressBarTests
|
||||
|
||||
pb.BeginInit ();
|
||||
pb.EndInit ();
|
||||
pb.LayoutSubViews ();
|
||||
pb.Layout ();
|
||||
|
||||
for (var i = 0; i < 38; i++)
|
||||
{
|
||||
@@ -879,7 +879,7 @@ public class ProgressBarTests
|
||||
|
||||
pb.BeginInit ();
|
||||
pb.EndInit ();
|
||||
pb.LayoutSubViews ();
|
||||
pb.Layout ();
|
||||
|
||||
for (var i = 0; i < 38; i++)
|
||||
{
|
||||
|
||||
@@ -514,6 +514,7 @@ public class SliderTests
|
||||
view.Add (slider);
|
||||
view.BeginInit ();
|
||||
view.EndInit ();
|
||||
view.Layout ();
|
||||
|
||||
Size expectedSize = slider.Frame.Size;
|
||||
|
||||
@@ -547,6 +548,7 @@ public class SliderTests
|
||||
view.Add (slider);
|
||||
view.BeginInit ();
|
||||
view.EndInit ();
|
||||
view.Layout ();
|
||||
|
||||
Size expectedSize = slider.Frame.Size;
|
||||
|
||||
@@ -580,6 +582,7 @@ public class SliderTests
|
||||
view.Add (slider);
|
||||
view.BeginInit ();
|
||||
view.EndInit ();
|
||||
view.Layout ();
|
||||
|
||||
Size expectedSize = slider.Frame.Size;
|
||||
|
||||
|
||||
@@ -1673,6 +1673,7 @@ Les Miśerables",
|
||||
var tf = new TextField { Width = 5, Text = "\u001b" };
|
||||
tf.BeginInit ();
|
||||
tf.EndInit ();
|
||||
tf.Layout ();
|
||||
tf.Draw ();
|
||||
|
||||
DriverAssert.AssertDriverContentsWithFrameAre ("\u241b", output);
|
||||
|
||||
@@ -819,6 +819,10 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.Equal (1, myReusableView.DisposalCount);
|
||||
}
|
||||
);
|
||||
|
||||
Assert.NotNull (Application.Top);
|
||||
Application.Top.Dispose ();
|
||||
Application.Shutdown ();
|
||||
}
|
||||
|
||||
[Theory]
|
||||
@@ -848,6 +852,10 @@ public class TileViewTests (ITestOutputHelper output)
|
||||
Assert.True (myReusableView.DisposalCount >= 1);
|
||||
}
|
||||
);
|
||||
|
||||
Assert.NotNull (Application.Top);
|
||||
Application.Top.Dispose ();
|
||||
Application.Shutdown ();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user