This commit is contained in:
Tig
2024-05-17 16:11:03 -07:00
parent ddd7e279c4
commit a355f34821
6 changed files with 180 additions and 111 deletions

View File

@@ -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]

View File

@@ -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);