mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fixing stuff
This commit is contained in:
@@ -9,6 +9,8 @@ public class MarginTests (ITestOutputHelper output)
|
||||
public void Margin_Uses_SuperView_ColorScheme ()
|
||||
{
|
||||
((FakeDriver)Application.Driver!).SetBufferSize (5, 5);
|
||||
View.Diagnostics = ViewDiagnosticFlags.Padding;
|
||||
|
||||
var view = new View { Height = 3, Width = 3 };
|
||||
view.Margin.Thickness = new (1);
|
||||
|
||||
@@ -27,7 +29,6 @@ public class MarginTests (ITestOutputHelper output)
|
||||
|
||||
superView.BeginInit ();
|
||||
superView.EndInit ();
|
||||
View.Diagnostics = ViewDiagnosticFlags.Padding;
|
||||
view.SetNeedsDisplay();
|
||||
view.Draw ();
|
||||
View.Diagnostics = ViewDiagnosticFlags.Off;
|
||||
|
||||
@@ -11,6 +11,7 @@ public class PaddingTests (ITestOutputHelper output)
|
||||
((FakeDriver)Application.Driver!).SetBufferSize (5, 5);
|
||||
var view = new View { Height = 3, Width = 3 };
|
||||
view.Padding.Thickness = new (1);
|
||||
view.Padding.Diagnostics = ViewDiagnosticFlags.Padding;
|
||||
|
||||
view.ColorScheme = new()
|
||||
{
|
||||
@@ -22,9 +23,7 @@ public class PaddingTests (ITestOutputHelper output)
|
||||
|
||||
view.BeginInit ();
|
||||
view.EndInit ();
|
||||
View.Diagnostics = ViewDiagnosticFlags.Padding;
|
||||
view.Draw ();
|
||||
View.Diagnostics = ViewDiagnosticFlags.Off;
|
||||
|
||||
TestHelpers.AssertDriverContentsAre (
|
||||
@"
|
||||
|
||||
@@ -43,7 +43,7 @@ public class DrawTests (ITestOutputHelper _output)
|
||||
Width = 3, Height = 3
|
||||
};
|
||||
view.Margin.Thickness = new (1);
|
||||
View.Diagnostics = ViewDiagnosticFlags.Padding;
|
||||
view.Margin.Diagnostics = ViewDiagnosticFlags.Padding;
|
||||
view.BeginInit ();
|
||||
view.EndInit ();
|
||||
view.Draw ();
|
||||
@@ -59,8 +59,6 @@ public class DrawTests (ITestOutputHelper _output)
|
||||
|
||||
view.AddRune (1, 1, Rune.ReplacementChar);
|
||||
Assert.Equal ((Rune)'M', Application.Driver?.Contents! [3, 3].Rune);
|
||||
|
||||
View.Diagnostics = ViewDiagnosticFlags.Off;
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
||||
@@ -16,8 +16,7 @@ public class DimFillTests (ITestOutputHelper output)
|
||||
RunState rs = Application.Begin (top);
|
||||
((FakeDriver)Application.Driver!).SetBufferSize (32, 5);
|
||||
|
||||
//view.SetNeedsLayout ();
|
||||
top.LayoutSubviews ();
|
||||
top.Layout ();
|
||||
|
||||
//view.SetRelativeLayout (new (0, 0, 32, 5));
|
||||
Assert.Equal (32, view.Frame.Width);
|
||||
@@ -61,7 +60,7 @@ public class DimFillTests (ITestOutputHelper output)
|
||||
super.Add (view);
|
||||
super.BeginInit ();
|
||||
super.EndInit ();
|
||||
super.LayoutSubviews ();
|
||||
super.Layout ();
|
||||
|
||||
Assert.Equal (25, super.Frame.Width);
|
||||
Assert.Equal (25, super.Frame.Height);
|
||||
@@ -103,7 +102,7 @@ public class DimFillTests (ITestOutputHelper output)
|
||||
super.Add (view);
|
||||
super.BeginInit ();
|
||||
super.EndInit ();
|
||||
super.LayoutSubviews ();
|
||||
super.Layout ();
|
||||
|
||||
Assert.Equal (25, super.Frame.Width);
|
||||
Assert.Equal (25, super.Frame.Height);
|
||||
@@ -167,7 +166,7 @@ public class DimFillTests (ITestOutputHelper output)
|
||||
super.Add (view);
|
||||
|
||||
view.Text = "New text\nNew line";
|
||||
super.LayoutSubviews ();
|
||||
super.Layout ();
|
||||
Rectangle expectedViewBounds = new (0, 0, 30, 80);
|
||||
|
||||
Assert.Equal (expectedViewBounds, view.Viewport);
|
||||
|
||||
Reference in New Issue
Block a user