add two test cases and relavent pictures for solving issue #211 #219
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Details
Description
By setting the parameters
PixelToleranceLevel
in the test to achieve aim comparation.Related Issue
#211
The bug is the following code can not distinguish difference in color and text between the two pictures.
Motivation and Context
This is because the distinction between the two graphs is too small. So we need to add
setPixelToleranceLevel(0.0)
when we use it. I also added a separate test to separate the two colors, it showsPixelToleranceLevel = 0.079
can distingrush #c20272 and #df0272. But onlyPixelToleranceLevel = 0.0
can recognize the difference in numbers.How Has This Been Tested
Tested in UT level
Types of changes
Checklist
Mention here,
shouldProperlyHandleBug180FromRoot()
inImageComparisonUtilUnitTest
seems has a incorrect file location for historical reasons. Maybe need to changeString imagePath = "build/resources/test/result.png";
toString imagePath = "build/test-images/result.png";
in line 163; But I'm not here to deal with it, just in case.