mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Merged
This commit is contained in:
@@ -43,7 +43,7 @@ public class PosAlignTests ()
|
||||
var width = 50;
|
||||
var expectedAnchor = -width;
|
||||
|
||||
Assert.Equal (expectedAnchor, posAlign.Anchor (width));
|
||||
Assert.Equal (expectedAnchor, posAlign.GetAnchor (width));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -222,32 +222,6 @@ public class PosTests ()
|
||||
[TestRespondersDisposed]
|
||||
public void LeftTopBottomRight_Win_ShouldNotThrow ()
|
||||
{
|
||||
// Setup Fake driver
|
||||
(Toplevel top, Window win, Button button) Setup ()
|
||||
{
|
||||
Application.Init (new FakeDriver ());
|
||||
Application.Iteration += (s, a) => { Application.RequestStop (); };
|
||||
var win = new Window { X = 0, Y = 0, Width = Dim.Fill (), Height = Dim.Fill () };
|
||||
var top = new Toplevel ();
|
||||
top.Add (win);
|
||||
|
||||
var button = new Button { X = Pos.Center (), Text = "button" };
|
||||
win.Add (button);
|
||||
|
||||
return (top, win, button);
|
||||
}
|
||||
|
||||
void Cleanup (RunState rs)
|
||||
{
|
||||
// Cleanup
|
||||
Application.End (rs);
|
||||
|
||||
Application.Top.Dispose ();
|
||||
|
||||
// Shutdown must be called to safely clean up Application if Init has been called
|
||||
Application.Shutdown ();
|
||||
}
|
||||
|
||||
// Test cases:
|
||||
(Toplevel top, Window win, Button button) app = Setup ();
|
||||
app.button.Y = Pos.Left (app.win);
|
||||
|
||||
Reference in New Issue
Block a user