| Index: gm/gm_expectations.h
|
| ===================================================================
|
| --- gm/gm_expectations.h (revision 8115)
|
| +++ gm/gm_expectations.h (working copy)
|
| @@ -103,7 +103,8 @@
|
| if (ignoreFailure.isNull()) {
|
| fIgnoreFailure = kDefaultIgnoreFailure;
|
| } else if (!ignoreFailure.isBool()) {
|
| - fprintf(stderr, "found non-boolean json value for key '%s' in element '%s'\n",
|
| + fprintf(stderr, GM_PREAMBLE "found non-boolean json value"
|
| + " for key '%s' in element '%s'\n",
|
| kJsonKey_ExpectedResults_IgnoreFailure,
|
| jsonElement.toStyledString().c_str());
|
| DEBUGFAIL_SEE_STDERR;
|
| @@ -116,7 +117,8 @@
|
| if (allowedChecksums.isNull()) {
|
| // ok, we'll just assume there aren't any expected checksums to compare against
|
| } else if (!allowedChecksums.isArray()) {
|
| - fprintf(stderr, "found non-array json value for key '%s' in element '%s'\n",
|
| + fprintf(stderr, GM_PREAMBLE "found non-array json value"
|
| + " for key '%s' in element '%s'\n",
|
| kJsonKey_ExpectedResults_Checksums,
|
| jsonElement.toStyledString().c_str());
|
| DEBUGFAIL_SEE_STDERR;
|
| @@ -124,7 +126,8 @@
|
| for (Json::ArrayIndex i=0; i<allowedChecksums.size(); i++) {
|
| Json::Value checksumElement = allowedChecksums[i];
|
| if (!checksumElement.isIntegral()) {
|
| - fprintf(stderr, "found non-integer checksum in json element '%s'\n",
|
| + fprintf(stderr, GM_PREAMBLE "found non-integer checksum"
|
| + " in json element '%s'\n",
|
| jsonElement.toStyledString().c_str());
|
| DEBUGFAIL_SEE_STDERR;
|
| } else {
|
| @@ -233,7 +236,7 @@
|
| return Expectations(referenceBitmap);
|
| } else {
|
| if (fNotifyOfMissingFiles) {
|
| - fprintf(stderr, "FAILED to read %s\n", path.c_str());
|
| + fprintf(stderr, GM_PREAMBLE "FAILED to read %s\n", path.c_str());
|
| }
|
| return Expectations();
|
| }
|
| @@ -331,14 +334,14 @@
|
| static bool parse(const char *jsonPath, Json::Value *jsonRoot) {
|
| SkFILEStream inFile(jsonPath);
|
| if (!inFile.isValid()) {
|
| - fprintf(stderr, "unable to read JSON file %s\n", jsonPath);
|
| + fprintf(stderr, GM_PREAMBLE "unable to read JSON file %s\n", jsonPath);
|
| DEBUGFAIL_SEE_STDERR;
|
| return false;
|
| }
|
|
|
| SkAutoDataUnref dataRef(readFileIntoSkData(inFile));
|
| if (NULL == dataRef.get()) {
|
| - fprintf(stderr, "error reading JSON file %s\n", jsonPath);
|
| + fprintf(stderr, GM_PREAMBLE "error reading JSON file %s\n", jsonPath);
|
| DEBUGFAIL_SEE_STDERR;
|
| return false;
|
| }
|
| @@ -347,7 +350,7 @@
|
| size_t size = dataRef.get()->size();
|
| Json::Reader reader;
|
| if (!reader.parse(bytes, bytes+size, *jsonRoot)) {
|
| - fprintf(stderr, "error parsing JSON file %s\n", jsonPath);
|
| + fprintf(stderr, GM_PREAMBLE "error parsing JSON file %s\n", jsonPath);
|
| DEBUGFAIL_SEE_STDERR;
|
| return false;
|
| }
|
|
|