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 compiling drawing tests on OSX #1815

Merged
merged 1 commit into from
Jan 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/UnitTests/CoreGraphics.drawing/DrawingTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ template class WhiteBackgroundTest<PixelByPixelImageComparator<PixelComparisonMo
template class UIKitMimicTest<PixelByPixelImageComparator<PixelComparisonModeMask<2300>>>;
template class UIKitMimicTest<PixelByPixelImageComparator<PixelComparisonModeMask<1024>>>;
template class UIKitMimicTest<PixelByPixelImageComparator<PixelComparisonModeMask<512>>>;
template class UIKitMimicTest<PixelByPixelImageComparator<PixelComparisonModeMask<64>>>;
template class UIKitMimicTest<PixelByPixelImageComparator<PixelComparisonModeMask<64>>>;
4 changes: 3 additions & 1 deletion tests/unittests/CoreGraphics.drawing/ImageComparison.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ struct ImageDelta {
ImageDelta(ImageComparisonResult result, size_t differences, CGImageRef deltaImage)
: result(result), differences(differences), deltaImage(CGImageRetain(deltaImage)) {
}

ImageDelta(ImageDelta&& other) : result(other.result), differences(other.differences), deltaImage(other.deltaImage.release()) {}

Choose a reason for hiding this comment

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

Sorry about that. We could also probably do it by adding a move constructor to unique_cf, but since that's practically dead at this point and no new code should be using it . . . little point eh

};

class ImageComparator {
Expand All @@ -61,4 +63,4 @@ template <typename PixelComparisonMode = PixelComparisonModeExact<1>>
class PixelByPixelImageComparator : public ImageComparator {
public:
ImageDelta CompareImages(CGImageRef left, CGImageRef right) override;
};
};