Changes before error encountered

Co-authored-by: tig <585482+tig@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-10-26 22:46:34 +00:00
parent 2ad82a1a07
commit 815a532754
5 changed files with 7 additions and 5 deletions

View File

@@ -98,6 +98,7 @@ public class FakeDriver : ConsoleDriver
_cols = FakeConsole.WindowWidth = FakeConsole.BufferWidth = FakeConsole.WIDTH;
_rows = FakeConsole.WindowHeight = FakeConsole.BufferHeight = FakeConsole.HEIGHT;
FakeConsole.Clear ();
ClearContents ();
ResizeScreen ();
CurrentAttribute = new Attribute (Color.White, Color.Black);
}

View File

@@ -25,8 +25,9 @@ public class ClipRegionTests
public void AddRune_Is_Clipped (Type driverType)
{
var driver = (IConsoleDriver)Activator.CreateInstance (driverType);
driver.Init ();
driver.SetScreenSize (80, 25);
Application.Init (driver);
Application.Driver!.SetScreenSize (80, 25);
driver.Move (0, 0);
driver.AddRune ('x');

View File

@@ -9,7 +9,7 @@ public class MarginTests (ITestOutputHelper output)
[SetupFakeDriver]
public void Margin_Is_Transparent ()
{
((IFakeConsoleDriver)Application.Driver!).SetBufferSize (5, 5);
Application.Driver!.SetScreenSize (5, 5);
var view = new View { Height = 3, Width = 3 };
view.Margin!.Diagnostics = ViewDiagnosticFlags.Thickness;
@@ -44,7 +44,7 @@ public class MarginTests (ITestOutputHelper output)
[SetupFakeDriver]
public void Margin_ViewPortSettings_Not_Transparent_Is_NotTransparent ()
{
((IFakeConsoleDriver)Application.Driver!).SetBufferSize (5, 5);
Application.Driver!.SetScreenSize (5, 5);
var view = new View { Height = 3, Width = 3 };
view.Margin!.Diagnostics = ViewDiagnosticFlags.Thickness;

View File

@@ -9,7 +9,7 @@ public class PaddingTests (ITestOutputHelper output)
[SetupFakeDriver]
public void Padding_Uses_Parent_Scheme ()
{
((IFakeConsoleDriver)Application.Driver!).SetBufferSize (5, 5);
Application.Driver!.SetScreenSize (5, 5);
var view = new View { Height = 3, Width = 3 };
view.Padding!.Thickness = new (1);
view.Padding.Diagnostics = ViewDiagnosticFlags.Thickness;

View File

@@ -171,7 +171,7 @@ public class ClipTests (ITestOutputHelper _output)
[Trait ("Category", "Unicode")]
public void Clipping_Wide_Runes ()
{
((IFakeConsoleDriver)Application.Driver!).SetBufferSize (30, 1);
Application.Driver!.SetScreenSize (30, 1);
var top = new View
{