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

Unified Diff: gm/gmmain.cpp

Issue 13811031: gm: hide list of tests with ignored errors, by default (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gmmain.cpp
===================================================================
--- gm/gmmain.cpp (revision 8579)
+++ gm/gmmain.cpp (working copy)
@@ -298,6 +298,27 @@
}
/**
+ * Display the summary of results with this ErrorType.
+ */
+ void DisplayResultTypeSummary(ErrorType type) {
+ SkString line;
+ if (fIgnorableErrorCombination.includes(type)) {
+ line.append("[ ] ");
+ } else {
+ line.append("[*] ");
+ }
+
+ SkTArray<SkString> *failedTestsOfThisType = &fFailedTests[type];
+ int count = failedTestsOfThisType->count();
+ line.appendf("%d %s:", count, getErrorTypeName(type));
+ for (int i = 0; i < count; ++i) {
+ line.append(" ");
+ line.append((*failedTestsOfThisType)[i]);
+ }
+ gm_fprintf(stdout, "%s\n", line.c_str());
+ }
+
+ /**
* List contents of fFailedTests to stdout.
*/
void ListErrors() {
@@ -312,22 +333,7 @@
// Now, for each failure type, list the tests that failed that way.
for (int typeInt = 0; typeInt <= kLast_ErrorType; typeInt++) {
- SkString line;
- ErrorType type = static_cast<ErrorType>(typeInt);
- if (fIgnorableErrorCombination.includes(type)) {
- line.append("[ ] ");
- } else {
- line.append("[*] ");
- }
-
- SkTArray<SkString> *failedTestsOfThisType = &fFailedTests[type];
- int count = failedTestsOfThisType->count();
- line.appendf("%d %s:", count, getErrorTypeName(type));
- for (int i = 0; i < count; ++i) {
- line.append(" ");
- line.append((*failedTestsOfThisType)[i]);
- }
- gm_fprintf(stdout, "%s\n", line.c_str());
+ this->DisplayResultTypeSummary(static_cast<ErrorType>(typeInt));
epoger 2013/04/09 20:08:26 patchset 1 extracts some logic into its own method
}
gm_fprintf(stdout, "(results marked with [*] will cause nonzero return value)\n");
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698