Fix test failures by making new architecture opt-in with UseNewArchitecture flag

Co-authored-by: tig <585482+tig@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-09-27 19:38:37 +00:00
parent 7c68e4913e
commit 2d27f38252
2 changed files with 48 additions and 11 deletions

View File

@@ -148,4 +148,26 @@ public class TextFormatterNewArchitectureTests
Application.Shutdown();
}
[Fact]
public void TextFormatter_UseNewArchitecture_Flag_Works()
{
Application.Init(new FakeDriver());
var tf = new TextFormatter
{
Text = "Hello World",
UseNewArchitecture = true // Enable new architecture
};
// This should now use the new architecture via the Draw method
tf.Draw(new Rectangle(0, 0, 10, 1), Attribute.Default, Attribute.Default);
// Test that the new architecture produces results
Size size = tf.GetFormattedSizeWithNewArchitecture();
Assert.True(size.Width > 0);
Assert.True(size.Height > 0);
Application.Shutdown();
}
}