Skip to content

Baseline comparisons with tolerance should not exit when values don't match (#218) - #1420

Merged
sfilipi merged 2 commits into
dotnet:masterfrom
feiyun0112:issue218
Nov 6, 2018
Merged

sfilipi merged 2 commits into
dotnet:masterfrom
feiyun0112:issue218

Conversation

@feiyun0112

Copy link
Copy Markdown
Contributor

Fix #218
call Fail() with a detailed error message saying which file and which line the error occurred in, and continue comparing the rest of the files in the unit test.

@shauheen
shauheen requested a review from yaeldekel October 28, 2018 23:14
{
if(!MatchNumberWithTolerance(firstCollection, secondCollection, digitsOfPrecision))
{
return false;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

    [](start = 33, length = 8)

nit: can you remove this extra spaces?

@Ivanidzo4ka Ivanidzo4ka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:shipit:

@sfilipi

sfilipi commented Oct 29, 2018

Copy link
Copy Markdown
Member

@yaeldekel @Ivanidzo4ka curious why do we want to continue comparing the rest of the baselines, if we already have a failure?

@TomFinley

Copy link
Copy Markdown
Contributor

@yaeldekel @Ivanidzo4ka curious why do we want to continue comparing the rest of the baselines, if we already have a failure?

Hi @sfilipi , consider how the baseline files were produced in the first place, or how they are updated when some systematic change happens. If the failure is deferred till the end of the test, then someone with Beyond Compare or some similar tool can update them all at once. However the failure happens immediately, then some files generated in subsequent steps will not be generated, making updating of baselines a multi-step process, instead of a single step process.

@TomFinley TomFinley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @feiyun0112 for fixing this annoyance!

@sfilipi
sfilipi merged commit 244a8c2 into dotnet:master Nov 6, 2018
@feiyun0112
feiyun0112 deleted the issue218 branch November 6, 2018 12:03
@ghost ghost locked as resolved and limited conversation to collaborators Mar 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants