Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: tools/image_expectations.h

Issue 283123002: render_pictures: add --mismatchPath flag (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix SkDebuggerGUI Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/bbh_shootout.cpp ('k') | tools/image_expectations.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef image_expectations_DEFINED 8 #ifndef image_expectations_DEFINED
9 #define image_expectations_DEFINED 9 #define image_expectations_DEFINED
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 * Adds expectations from a JSON file, returning true if successful. 83 * Adds expectations from a JSON file, returning true if successful.
84 */ 84 */
85 bool readExpectationsFile(const char *jsonPath); 85 bool readExpectationsFile(const char *jsonPath);
86 86
87 /** 87 /**
88 * Adds this image to the summary of results. 88 * Adds this image to the summary of results.
89 * 89 *
90 * @param sourceName name of the source file that generated this result 90 * @param sourceName name of the source file that generated this result
91 * @param fileName relative path to the image output file on local disk 91 * @param fileName relative path to the image output file on local disk
92 * @param digest description of the image's contents 92 * @param digest description of the image's contents
93 * @param tileNumber if not NULL, ptr to tile number 93 * @param tileNumber if not NULL, pointer to tile number
94 */ 94 */
95 void add(const char *sourceName, const char *fileName, const ImageDigest &digest, 95 void add(const char *sourceName, const char *fileName, const ImageDigest &digest,
96 const int *tileNumber=NULL); 96 const int *tileNumber=NULL);
97 97
98 /** 98 /**
99 * Returns true if this test result matches its expectations.
100 * If there are no expectations for this test result, this will return f alse.
101 *
102 * @param sourceName name of the source file that generated this result
103 * @param digest description of the image's contents
104 * @param tileNumber if not NULL, pointer to tile number
105 */
106 bool matchesExpectation(const char *sourceName, const ImageDigest &diges t,
107 const int *tileNumber=NULL);
108
109 /**
99 * Writes the summary (as constructed so far) to a file. 110 * Writes the summary (as constructed so far) to a file.
100 * 111 *
101 * @param filename path to write the summary to 112 * @param filename path to write the summary to
102 */ 113 */
103 void writeToFile(const char *filename) const; 114 void writeToFile(const char *filename) const;
104 115
105 private: 116 private:
106 117
107 /** 118 /**
108 * Read the file contents from jsonPath and parse them into jsonRoot. 119 * Read the file contents from jsonPath and parse them into jsonRoot.
109 * 120 *
110 * Returns true if successful. 121 * Returns true if successful.
111 */ 122 */
112 static bool Parse(const char *jsonPath, Json::Value *jsonRoot); 123 static bool Parse(const char *jsonPath, Json::Value *jsonRoot);
113 124
114 Json::Value fActualResults; 125 Json::Value fActualResults;
115 Json::Value fExpectedJsonRoot; 126 Json::Value fExpectedJsonRoot;
116 Json::Value fExpectedResults; 127 Json::Value fExpectedResults;
117 }; 128 };
118 129
119 } // namespace sk_tools 130 } // namespace sk_tools
120 131
121 #endif // image_expectations_DEFINED 132 #endif // image_expectations_DEFINED
OLDNEW
« no previous file with comments | « tools/bbh_shootout.cpp ('k') | tools/image_expectations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698