2013-10-16 13:02:15 +00:00
|
|
|
#include "DMComparisonTask.h"
|
|
|
|
#include "DMUtil.h"
|
|
|
|
|
|
|
|
namespace DM {
|
|
|
|
|
|
|
|
ComparisonTask::ComparisonTask(const Task& parent,
|
|
|
|
skiagm::Expectations expectations,
|
|
|
|
SkBitmap bitmap)
|
|
|
|
: Task(parent)
|
|
|
|
, fName(parent.name()) // Masquerade as parent so failures are attributed to it.
|
|
|
|
, fExpectations(expectations)
|
|
|
|
, fBitmap(bitmap)
|
|
|
|
{}
|
|
|
|
|
|
|
|
void ComparisonTask::draw() {
|
2013-10-21 18:40:25 +00:00
|
|
|
if (!MeetsExpectations(fExpectations, fBitmap)) {
|
2013-10-16 13:02:15 +00:00
|
|
|
this->fail();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace DM
|