mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Also testing with a Pos and Dim null values.
This commit is contained in:
@@ -248,7 +248,9 @@ namespace Terminal.Gui {
|
||||
Width = Dim.Width (w) - 2,
|
||||
Height = Dim.Percent (10)
|
||||
};
|
||||
w.Add (v);
|
||||
var vn = new View (new Rect (1, 2, 3, 3));
|
||||
|
||||
w.Add (v, vn);
|
||||
t.Add (w);
|
||||
|
||||
t.Ready += () => {
|
||||
@@ -258,6 +260,7 @@ namespace Terminal.Gui {
|
||||
Assert.Equal (2, w.Height);
|
||||
Assert.Throws<ArgumentException> (() => v.Width = 2);
|
||||
Assert.Throws<ArgumentException> (() => v.Height = 2);
|
||||
Assert.Equal (4, vn.Height = 4);
|
||||
};
|
||||
|
||||
Application.Iteration += () => Application.RequestStop ();
|
||||
|
||||
@@ -387,7 +387,9 @@ namespace Terminal.Gui {
|
||||
X = Pos.Center (),
|
||||
Y = Pos.Percent (10)
|
||||
};
|
||||
w.Add (v);
|
||||
var vn = new View (new Rect (1, 3, 3, 4));
|
||||
|
||||
w.Add (v, vn);
|
||||
t.Add (w);
|
||||
|
||||
t.Ready += () => {
|
||||
@@ -397,6 +399,7 @@ namespace Terminal.Gui {
|
||||
Assert.Equal (2, w.Y);
|
||||
Assert.Throws<ArgumentException> (() => v.X = 2);
|
||||
Assert.Throws<ArgumentException> (() => v.Y = 2);
|
||||
Assert.Equal (2, vn.Y = 2);
|
||||
};
|
||||
|
||||
Application.Iteration += () => Application.RequestStop ();
|
||||
|
||||
Reference in New Issue
Block a user