mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-28 16:58:01 +01:00
Adds more unit tests for minimum full border without Left and Right thickness.
This commit is contained in:
@@ -217,7 +217,7 @@ namespace Terminal.Gui {
|
||||
var drawTop = Thickness.Top > 0 && Frame.Width > 1 && Frame.Height > 0;
|
||||
var drawLeft = Thickness.Left > 0 && (Frame.Height > 1 || Thickness.Top == 0);
|
||||
var drawBottom = Thickness.Bottom > 0 && Frame.Width > 1 && Frame.Height > 1;
|
||||
var drawRight = Thickness.Right > 0 && ((Frame.Width > 1 && Frame.Height > 1) || Thickness.Top == 0);
|
||||
var drawRight = Thickness.Right > 0 && ((Frame.Width > 0 && Frame.Height > 1) || Thickness.Top == 0);
|
||||
|
||||
var prevAttr = Driver.GetAttribute ();
|
||||
if (ColorScheme != null) {
|
||||
|
||||
@@ -347,6 +347,18 @@ t ", output);
|
||||
└┘", output);
|
||||
}
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
public void Draw_Minimum_Full_Border_Width_One_Height_One_Without_Top ()
|
||||
{
|
||||
var label = new Label () { Width = 1, Height = 1, BorderStyle = LineStyle.Single };
|
||||
label.Border.Thickness = new Thickness (1, 0, 1, 1);
|
||||
Application.Top.Add (label);
|
||||
Application.Begin (Application.Top);
|
||||
|
||||
TestHelpers.AssertDriverContentsWithFrameAre (@"
|
||||
││", output);
|
||||
}
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
public void Draw_Minimum_Full_Border_Width_One_Height_One_Without_Bottom ()
|
||||
{
|
||||
@@ -360,15 +372,29 @@ t ", output);
|
||||
}
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
public void Draw_Minimum_Full_Border_Width_One_Height_One_Without_Top ()
|
||||
public void Draw_Minimum_Full_Border_Width_One_Height_One_Without_Left ()
|
||||
{
|
||||
var label = new Label () { Width = 1, Height = 1, BorderStyle = LineStyle.Single };
|
||||
label.Border.Thickness = new Thickness (1, 0, 1, 1);
|
||||
label.Border.Thickness = new Thickness (0, 1, 1, 1);
|
||||
Application.Top.Add (label);
|
||||
Application.Begin (Application.Top);
|
||||
|
||||
TestHelpers.AssertDriverContentsWithFrameAre (@"
|
||||
││", output);
|
||||
│
|
||||
│", output);
|
||||
}
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
public void Draw_Minimum_Full_Border_Width_One_Height_One_Without_Right ()
|
||||
{
|
||||
var label = new Label () { Width = 1, Height = 1, BorderStyle = LineStyle.Single };
|
||||
label.Border.Thickness = new Thickness (1, 1, 0, 1);
|
||||
Application.Top.Add (label);
|
||||
Application.Begin (Application.Top);
|
||||
|
||||
TestHelpers.AssertDriverContentsWithFrameAre (@"
|
||||
│
|
||||
│", output);
|
||||
}
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
|
||||
Reference in New Issue
Block a user