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"); |
} |