Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CT drawing tests on ARM #1780

Merged
merged 1 commit into from
Jan 24, 2017
Merged

Fix CT drawing tests on ARM #1780

merged 1 commit into from
Jan 24, 2017

Conversation

aballway
Copy link
Contributor

@aballway aballway commented Jan 24, 2017

Changes more tests to be more lenient, and changes the templates for the image comparison to work with the Gtest macros
Fixes #1772


This change is Reviewable

@@ -21,7 +21,23 @@

enum class ImageComparisonResult : unsigned int { Unknown = 0, Incomparable, Different, Same };

enum struct ComparisonMode { Exact, Mask };
struct rgbaPixel {

Choose a reason for hiding this comment

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

rgbaPixel [](start = 7, length = 9)

is there really literally no way to not move this into the header :P

@@ -470,7 +470,7 @@ TEXT_DRAW_TEST_F(CTLine, BasicDrawingTest, WhiteBackgroundTest<PixelByPixelImage
CTRunDraw(run, context, {});
}

class Fonts : public WhiteBackgroundTest<PixelByPixelImageComparator<ComparisonMode::Mask>>,
class Fonts : public WhiteBackgroundTest<PixelByPixelImageComparator<PixelComparisonModeMask<2300>>>,

Choose a reason for hiding this comment

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

2300 [](start = 93, length = 4)

document why 2300, that's a heck of a lot

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. Given our reference images are 512x256, this is ~1.5%. The bigger concern is that we are not accounting for cases such as lines being completely at a different offset, etc. We need a more "fuzzy" proximity comparison than a pixel count. But that is an exercise for a different time.


In reply to: 97449301 [](ancestors = 97449301)

@DHowett-MSFT
Copy link

:shipit:

@rajsesh rajsesh merged commit f194201 into microsoft:develop Jan 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants