Merge branch 'v2_develop' into copilot/port-parallelizable-unit-tests

This commit is contained in:
Tig
2025-10-19 09:46:41 -06:00
committed by GitHub
33 changed files with 1419 additions and 303 deletions

View File

@@ -142,6 +142,7 @@ public class SchemeTests
var customScheme = SchemeManager.GetHardCodedSchemes ()? ["Error"]! with { Normal = Attribute.Default };
Assert.NotEqual (Attribute.Default, view.GetScheme ().Normal);
view.GettingScheme += (sender, args) =>
{
args.Result = customScheme;
@@ -174,13 +175,13 @@ public class SchemeTests
var customAttribute = new Attribute (Color.BrightRed, Color.BrightYellow);
view.GettingAttributeForRole += (sender, args) =>
{
if (args.Role == VisualRole.Focus)
{
args.Result = customAttribute;
args.Handled = true;
}
};
{
if (args.Role == VisualRole.Focus)
{
args.Result = customAttribute;
args.Handled = true;
}
};
Assert.Equal (customAttribute, view.GetAttributeForRole (VisualRole.Focus));
view.Dispose ();
@@ -199,6 +200,7 @@ public class SchemeTests
Assert.Contains ("Toplevel", schemes.Keys);
}
[Fact]
public void SchemeName_OverridesSuperViewScheme ()
{
@@ -243,6 +245,7 @@ public class SchemeTests
protected override bool OnGettingScheme (out Scheme? scheme)
{
scheme = SchemeManager.GetHardCodedSchemes ()? ["Error"];
return true;
}
@@ -265,4 +268,5 @@ public class SchemeTests
view.Dispose ();
}
}
}