mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fixed AllViewsTester
This commit is contained in:
@@ -850,38 +850,6 @@ public class DimAutoTests (ITestOutputHelper output)
|
||||
|
||||
Assert.Equal (new Size (5, 1), view.ContentSize);
|
||||
}
|
||||
[SetupFakeDriver]
|
||||
[Fact]
|
||||
public void DimAuto_ChangeNonDimAuto_Via_AutoSize_False_Resets_ContentSize ()
|
||||
{
|
||||
View view = new ()
|
||||
{
|
||||
Width = Auto (),
|
||||
Height = Auto (),
|
||||
Text = "01234"
|
||||
};
|
||||
|
||||
Assert.Equal (new Rectangle (0, 0, 5, 1), view.Frame);
|
||||
Assert.Equal (new Size (5, 1), view.ContentSize);
|
||||
|
||||
// Change text to a longer string
|
||||
view.Text = "0123456789";
|
||||
|
||||
Assert.Equal (new Rectangle (0, 0, 10, 1), view.Frame);
|
||||
Assert.Equal (new Size (10, 1), view.ContentSize);
|
||||
|
||||
// Cause Width/Height to be set to absolute. This should reset ContentSize
|
||||
view.AutoSize = false;
|
||||
|
||||
Assert.Equal (new Rectangle (0, 0, 10, 1), view.Frame);
|
||||
Assert.Equal (new Size (10, 1), view.ContentSize);
|
||||
|
||||
// If ContentSize was reset, these should cause it to update
|
||||
view.Width = 5;
|
||||
view.Height = 1;
|
||||
|
||||
Assert.Equal (new Size (5, 1), view.ContentSize);
|
||||
}
|
||||
|
||||
// DimAutoStyle.Content tests
|
||||
[Fact]
|
||||
|
||||
@@ -406,7 +406,6 @@ public class DimTests
|
||||
|
||||
var v1 = new Button
|
||||
{
|
||||
AutoSize = false,
|
||||
X = Pos.X (f1) + 2,
|
||||
Y = Pos.Bottom (f1) + 2,
|
||||
Width = Dim.Width (f1) - 2,
|
||||
@@ -417,7 +416,6 @@ public class DimTests
|
||||
|
||||
var v2 = new Button
|
||||
{
|
||||
AutoSize = false,
|
||||
X = Pos.X (f2) + 2,
|
||||
Y = Pos.Bottom (f2) + 2,
|
||||
Width = Dim.Width (f2) - 2,
|
||||
@@ -428,7 +426,6 @@ public class DimTests
|
||||
|
||||
var v3 = new Button
|
||||
{
|
||||
AutoSize = false,
|
||||
Width = Dim.Percent (10),
|
||||
Height = Dim.Percent (10),
|
||||
ValidatePosDim = true,
|
||||
@@ -437,7 +434,6 @@ public class DimTests
|
||||
|
||||
var v4 = new Button
|
||||
{
|
||||
AutoSize = false,
|
||||
Width = Dim.Sized (50),
|
||||
Height = Dim.Sized (50),
|
||||
ValidatePosDim = true,
|
||||
@@ -446,7 +442,6 @@ public class DimTests
|
||||
|
||||
var v5 = new Button
|
||||
{
|
||||
AutoSize = false,
|
||||
Width = Dim.Width (v1) - Dim.Width (v3),
|
||||
Height = Dim.Height (v1) - Dim.Height (v3),
|
||||
ValidatePosDim = true,
|
||||
@@ -455,7 +450,6 @@ public class DimTests
|
||||
|
||||
var v6 = new Button
|
||||
{
|
||||
AutoSize = false,
|
||||
X = Pos.X (f2),
|
||||
Y = Pos.Bottom (f2) + 2,
|
||||
Width = Dim.Percent (20, true),
|
||||
|
||||
Reference in New Issue
Block a user