Fixed more bad code

This commit is contained in:
Tig
2024-03-25 16:54:08 -06:00
parent 9c0fb02593
commit 6ebee8d42b
15 changed files with 193 additions and 187 deletions

View File

@@ -175,7 +175,7 @@ CTRL-O Open {
iteration++;
};
Application.Run ();
Application.Run ().Dispose ();
}
[Fact]

View File

@@ -1839,10 +1839,10 @@ public class ToplevelTests
BorderStyle = LineStyle.Single
};
Assert.Equal (testWindow, Application.Current);
Application.Current.DrawContentComplete += testWindow_DrawContentComplete;
Application.Current.DrawContentComplete += OnDrawContentComplete;
top.Add (viewAddedToTop);
void testWindow_DrawContentComplete (object sender, DrawEventArgs e)
void OnDrawContentComplete (object sender, DrawEventArgs e)
{
Assert.Equal (new Rectangle (1, 3, 18, 16), viewAddedToTop.Frame);
@@ -1857,7 +1857,7 @@ public class ToplevelTests
View.Driver.AddStr ("Three");
Application.Driver.Clip = savedClip;
Application.Current.DrawContentComplete -= testWindow_DrawContentComplete;
Application.Current.DrawContentComplete -= OnDrawContentComplete;
}
};
RunState rsTestWindow = Application.Begin (testWindow);
@@ -1936,6 +1936,8 @@ public class ToplevelTests
Application.End (rsTop);
}
private void OnDrawContentComplete (object sender, DrawEventArgs e) { throw new NotImplementedException (); }
[Fact]
[AutoInitShutdown]
public void Activating_MenuBar_By_Alt_Key_Does_Not_Throw ()