gm: Add ability to compare against checksums (as opposed to image files)
Review URL: https://codereview.appspot.com/7306071
git-svn-id: http://skia.googlecode.com/svn/trunk@7724 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index da7b79e..a3e2833 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -94,17 +94,6 @@
const static ErrorBitfield ERROR_READING_REFERENCE_IMAGE = 0x08;
const static ErrorBitfield ERROR_WRITING_REFERENCE_IMAGE = 0x10;
-const static char kJsonKey_ActualResults[] = "actual-results";
-const static char kJsonKey_ActualResults_Failed[] = "failed";
-const static char kJsonKey_ActualResults_FailureIgnored[]= "failure-ignored";
-const static char kJsonKey_ActualResults_NoComparison[] = "no-comparison";
-const static char kJsonKey_ActualResults_Succeeded[] = "succeeded";
-const static char kJsonKey_ActualResults_AnyStatus_Checksum[] = "checksum";
-
-const static char kJsonKey_ExpectedResults[] = "expected-results";
-const static char kJsonKey_ExpectedResults_Checksums[] = "checksums";
-const static char kJsonKey_ExpectedResults_IgnoreFailure[] = "ignore-failure";
-
using namespace skiagm;
struct FailRec {
@@ -1392,10 +1381,10 @@
IndividualImageExpectationsSource,
(readPath, notifyMissingReadReference)));
} else {
- fprintf(stderr, "reading expectations from JSON summary file %s ",
+ fprintf(stderr, "reading expectations from JSON summary file %s\n",
readPath);
- fprintf(stderr, "BUT WE DON'T KNOW HOW TO DO THIS YET!\n");
- return -1;
+ gmmain.fExpectationsSource.reset(SkNEW_ARGS(
+ JsonExpectationsSource, (readPath)));
}
}
if (writePath) {