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

Unified Diff: lib/html_config.dart

Issue 939243002: pkg/unittest: improve output of TestCase errors in HtmlConfig (Closed) Base URL: https://github.com/dart-lang/unittest.git@stable
Patch Set: nits Created 5 years, 10 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 | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/html_config.dart
diff --git a/lib/html_config.dart b/lib/html_config.dart
index 210f0f5e0d68696cebc93a26f26d7271370e1fd2..c472d58d89ff2e1f76844187b2cb326f64cb22cd 100644
--- a/lib/html_config.dart
+++ b/lib/html_config.dart
@@ -62,11 +62,11 @@ void _showResultsInPage(int passed, int failed, int errors,
}
}
-String _toHtml(TestCase test_) {
- if (!test_.isComplete) {
+String _toHtml(TestCase testCase) {
+ if (!testCase.isComplete) {
return '''
<tr>
- <td>${test_.id}</td>
+ <td>${testCase.id}</td>
<td class="unittest-error">NO STATUS</td>
<td>Test did not complete</td>
</tr>''';
@@ -74,14 +74,23 @@ String _toHtml(TestCase test_) {
var html = '''
<tr>
- <td>${test_.id}</td>
- <td class="unittest-${test_.result}">${test_.result.toUpperCase()}</td>
- <td>Expectation: <a href="#testFilter=${test_.description}">${test_.description}</a>. ${HTML_ESCAPE.convert(test_.message)}</td>
+ <td>${testCase.id}</td>
+ <td class="unittest-${testCase.result}">
+ ${testCase.result.toUpperCase()}
+ </td>
+ <td>
+ <p>Expectation:
+ <a href="#testFilter=${testCase.description}">
+ ${testCase.description}
+ </a>.
+ </p>
+ <pre>${HTML_ESCAPE.convert(testCase.message)}</pre>
+ </td>
</tr>''';
- if (test_.stackTrace != null) {
+ if (testCase.stackTrace != null) {
html = '$html<tr><td></td><td colspan="2"><pre>' +
- HTML_ESCAPE.convert(test_.stackTrace.toString()) +
+ HTML_ESCAPE.convert(testCase.stackTrace.toString()) +
'</pre></td></tr>';
}
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698