Skip to content

Commit 1e0f174

Browse files
author
msftbot[bot]
authored
Turned off layout rounding for failing tests (#3942)
Some tests were failing if your resolution was 150% (not 100%). This fixes the 3 failing tests. ## PR Type What kind of change does this PR introduce? <!-- Please uncomment one or more that apply to this PR. --> - Bugfix <!-- - Feature --> <!-- - Code style update (formatting) --> <!-- - Refactoring (no functional changes, no api changes) --> <!-- - Build or CI related changes --> <!-- - Documentation content changes --> <!-- - Sample app changes --> <!-- - Other... Please describe: --> ## What is the current behavior? Tests fail if your display scale is 150% ## What is the new behavior? Tests pass independently from your display scale. ## PR Checklist Please check if your PR fulfills the following requirements: - [X] Tested code with current [supported SDKs](../readme.md#supported) - [ ] Pull Request has been submitted to the documentation repository [instructions](..\contributing.md#docs). Link: <!-- docs PR link --> - [ ] Sample in sample app has been added / updated (for bug fixes / features) - [ ] Icon has been created (if new sample) following the [Thumbnail Style Guide and templates](https://github.com/windows-toolkit/WindowsCommunityToolkit-design-assets) - [ ] New major technical changes in the toolkit have or will be added to the [Wiki](https://github.com/windows-toolkit/WindowsCommunityToolkit/wiki) e.g. build changes, source generators, testing infrastructure, sample creation changes, etc... - [ ] Tests for the changes have been added (for bug fixes / features) (if applicable) - [ ] Header has been added to all new source files (run *build/UpdateHeaders.bat*) - [X] Contains **NO** breaking changes <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. Please note that breaking changes are likely to be rejected within minor release cycles or held until major versions. --> ## Other information
2 parents 33eab9b + 8ffac25 commit 1e0f174

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

UnitTests/UnitTests.UWP/UI/Controls/Test_WrapPanel_Visibility.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
3737
</controls:WrapPanel>
3838
</Page>") as FrameworkElement;
3939

40+
treeRoot.UseLayoutRounding = false;
41+
4042
var expected = new (int u, int v, int w, int h)[]
4143
{
4244
(0, 0, 0, 0), // Collapsed
@@ -94,6 +96,8 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
9496
</controls:WrapPanel>
9597
</Page>") as FrameworkElement;
9698

99+
treeRoot.UseLayoutRounding = false;
100+
97101
var expected = new (int u, int v, int w, int h)[]
98102
{
99103
(0, 0, 150, 50),
@@ -149,6 +153,8 @@ await App.DispatcherQueue.EnqueueAsync(async () =>
149153
</controls:WrapPanel>
150154
</Page>") as FrameworkElement;
151155

156+
treeRoot.UseLayoutRounding = false;
157+
152158
var expected = new (int u, int v, int w, int h)[]
153159
{
154160
(0, 0, 150, 50),

0 commit comments

Comments
 (0)