Skip to content

Test_ConstrainedBox_AllInfinite_AspectBothFallback fails on high DPI #4190

@azchohfi

Description

@azchohfi

Describe the bug

Test_ConstrainedBox_AllInfinite_AspectBothFallback fails on DPI other than 100%.

Failed Test_ConstrainedBox_AllInfinite_AspectBothFallback [45 ms]
Error Message:
Assert.AreEqual failed. Expected a difference no greater than <0.01> between expected value <493.6666564941406> and actual value <493.3333435058594>. Actual width does not meet expected value of 493.6666564941406
Stack Trace:
at UnitTests.UWP.UI.Controls.Test_ConstrainedBox.<Test_ConstrainedBox_AllInfinite_AspectBothFallback>b__12_0()
at CommunityToolkit.WinUI.DispatcherQueueExtensions.<>c__DisplayClass2_0.<b__1>d.MoveNext()
--- End of stack trace from previous location ---
at UnitTests.UWP.UI.Controls.Test_ConstrainedBox.Test_ConstrainedBox_AllInfinite_AspectBothFallback()
at Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.ThreadOperations.ExecuteWithAbortSafety(Action action)

  • Is this bug a regression in the toolkit? If so, what toolkit version did you last see it work:

Steps to Reproduce

Steps to reproduce the behavior:

  1. Run the Unit Tests in 150% dpi.
  2. See error

Expected behavior

Tests pass on any DPI

Environment

NuGet Package(s):

Package Version(s):

Windows 10 Build Number:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)
  • May 2020 Update (19041)
  • Insider Build ({build_number})

App min and target version:

  • Fall Creators Update (16299)
  • April 2018 Update (17134)
  • October 2018 Update (17763)
  • May 2019 Update (18362)
  • May 2020 Update (19041)
  • Insider Build ({build_number})

Device form factor:

  • Desktop
  • Xbox
  • Surface Hub
  • IoT

Visual Studio version:

  • 2017 (15.{minor_version})
  • 2019 (16.{minor_version})
  • 2022 (17.{minor_version})

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Completed 🔥bug 🐛An unexpected issue that highlights incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions