Fix xUnit warnings in AnimationIterationTests (#20459)

This commit is contained in:
Julien Lebosquain
2026-01-13 14:55:18 +01:00
committed by GitHub
parent e8a0bee928
commit c8f59f84af
@@ -640,7 +640,7 @@ namespace Avalonia.Base.UnitTests.Animation
var root = new TestRoot(border);
root.LayoutManager.ExecuteInitialLayoutPass();
var animationTask = animation.RunAsync(border, clock);
var animationTask = animation.RunAsync(border, clock, TestContext.Current.CancellationToken);
// Pulse the clock - this should not throw even though
// the first keyframe's value is null (falls back to neutral value)
@@ -694,7 +694,7 @@ namespace Avalonia.Base.UnitTests.Animation
root.LayoutManager.ExecuteInitialLayoutPass();
// Start animation - the first keyframe value will be null due to unresolved binding
var task = animation.RunAsync(control, clock);
var task = animation.RunAsync(control, clock, TestContext.Current.CancellationToken);
// The fix ensures this doesn't throw NullReferenceException
// Animation falls back to neutral value and continues