Skip to content

[tests] Fix CRLF vs LF issues - #52536

Merged
radekdoulik merged 4 commits into
dotnet:mainfrom
radekdoulik:pr-tensor-tests-fix-lf-vs-crlf
May 13, 2021
Merged

radekdoulik merged 4 commits into
dotnet:mainfrom
radekdoulik:pr-tensor-tests-fix-lf-vs-crlf

Conversation

@radekdoulik

@radekdoulik radekdoulik commented May 10, 2021 •

Copy link
Copy Markdown
Member

Fixes: #52134

When running System.Numerics.Tensors tests on windows and targeting
Browser, the line ending differs between host and target systems.
Compensate for that by using
Assert.Equal(..., ignoreLineEndingDifferences: true).

Also replace the compile time new line when creating expectedNoSpace
string.

The Browser Environment.NewLine is \n, while windows use \r\n.

When running `System.Numerics.Tensors` tests on windows and  targeting
`Browser`,the line ending differs between host and target systems.
Compensate for that by using
`Assert.Equal(..., ignoreLineEndingDifferences: true)`.

Also replace the compile time new line when creating `expectedNoSpace`
string.

The `Browser` Environment.NewLine is `\n`, while windows use `\r\n`.
https://github.com/dotnet/runtime/blob/5bd0edfe860e41bdfd690d3743e730594307292e/src/libraries/System.Private.CoreLib/src/System/Environment.UnixOrBrowser.cs#L51
@radekdoulik radekdoulik added arch-wasm WebAssembly architecture area-System.Numerics labels May 10, 2021
@radekdoulik
radekdoulik requested a review from lewing May 10, 2021 10:56
@ghost

ghost commented May 10, 2021

Copy link
Copy Markdown

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

When running System.Numerics.Tensors tests on windows and targeting
Browser,the line ending differs between host and target systems.
Compensate for that by using
Assert.Equal(..., ignoreLineEndingDifferences: true).

Also replace the compile time new line when creating expectedNoSpace
string.

The Browser Environment.NewLine is \n, while windows use \r\n.

Author: radekdoulik
Assignees: -
Labels:

arch-wasm, area-System.Numerics

Milestone: -

@radekdoulik radekdoulik changed the title Fixes: https://github.com/dotnet/runtime/issues/52134 [tests] Fix CRLF vs LF issues May 10, 2021

@lewing lewing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@radekdoulik
radekdoulik merged commit 4de9167 into dotnet:main May 13, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-System.Numerics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[wasm] System.Numerics.Tensors tests failing on windows/helix

3 participants