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

Side by Side Diff: lib/unittest/test_case.dart

Issue 10692176: Wire up onTestResult callbacks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * testcase.dart: this file is sourced by unittest.dart. It defines [TestCase] 6 * testcase.dart: this file is sourced by unittest.dart. It defines [TestCase]
7 * and assumes unittest defines the type [TestFunction]. 7 * and assumes unittest defines the type [TestFunction].
8 */ 8 */
9 9
10 /** Summarizes information about a single test case. */ 10 /** Summarizes information about a single test case. */
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 test(); 60 test();
61 } finally { 61 } finally {
62 if (_teardown != null) { 62 if (_teardown != null) {
63 _teardown(); 63 _teardown();
64 } 64 }
65 } 65 }
66 } 66 }
67 67
68 void pass() { 68 void pass() {
69 result = _PASS; 69 result = _PASS;
70 _config.onTestResult(this);
70 } 71 }
71 72
72 void fail(String message, String stackTrace) { 73 void fail(String message, String stackTrace) {
73 result = _FAIL; 74 result = _FAIL;
74 this.message = message; 75 this.message = message;
75 this.stackTrace = stackTrace; 76 this.stackTrace = stackTrace;
77 _config.onTestResult(this);
76 } 78 }
77 79
78 void error(String message, String stackTrace) { 80 void error(String message, String stackTrace) {
79 result = _ERROR; 81 result = _ERROR;
80 this.message = message; 82 this.message = message;
81 this.stackTrace = stackTrace; 83 this.stackTrace = stackTrace;
84 _config.onTestResult(this);
82 } 85 }
83 } 86 }
OLDNEW
« 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