Make new architecture the default and validate all tests pass

Co-authored-by: tig <585482+tig@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-09-27 23:43:43 +00:00
parent 2d27f38252
commit ae980c392e
2 changed files with 8 additions and 5 deletions

View File

@@ -34,7 +34,7 @@ public class TextFormatter
/// When true, the Draw method will use the new separated formatter/renderer architecture.
/// This provides better performance and addresses Format/Draw coupling issues.
/// </summary>
public bool UseNewArchitecture { get; set; } = false;
public bool UseNewArchitecture { get; set; } = true;
/// <summary>
/// Initializes a new instance of the <see cref="TextFormatter"/> class.

View File

@@ -150,17 +150,17 @@ public class TextFormatterNewArchitectureTests
}
[Fact]
public void TextFormatter_UseNewArchitecture_Flag_Works()
public void TextFormatter_UseNewArchitecture_Flag_DefaultsToTrue()
{
Application.Init(new FakeDriver());
var tf = new TextFormatter
{
Text = "Hello World",
UseNewArchitecture = true // Enable new architecture
Text = "Hello World"
// UseNewArchitecture defaults to true now
};
// This should now use the new architecture via the Draw method
// This should use the new architecture by default
tf.Draw(new Rectangle(0, 0, 10, 1), Attribute.Default, Attribute.Default);
// Test that the new architecture produces results
@@ -168,6 +168,9 @@ public class TextFormatterNewArchitectureTests
Assert.True(size.Width > 0);
Assert.True(size.Height > 0);
// Verify default is true
Assert.True(tf.UseNewArchitecture);
Application.Shutdown();
}
}