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

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

Issue 10124010: Migrate to interpolation instead of concatenation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/json/json.dart ('k') | 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 * A library for writing dart unit tests. 6 * A library for writing dart unit tests.
7 * 7 *
8 * ##Concepts## 8 * ##Concepts##
9 * 9 *
10 * * Tests: Tests are specified via the top-level function [test], they can be 10 * * Tests: Tests are specified via the top-level function [test], they can be
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 } 258 }
259 259
260 /** Called by subclasses to indicate that an asynchronous test completed. */ 260 /** Called by subclasses to indicate that an asynchronous test completed. */
261 void callbackDone() { 261 void callbackDone() {
262 _callbacksCalled++; 262 _callbacksCalled++;
263 final testCase = _tests[_currentTest]; 263 final testCase = _tests[_currentTest];
264 if (_callbacksCalled > testCase.callbacks) { 264 if (_callbacksCalled > testCase.callbacks) {
265 final expected = testCase.callbacks; 265 final expected = testCase.callbacks;
266 testCase.error( 266 testCase.error(
267 'More calls to callbackDone() than expected. ' 267 'More calls to callbackDone() than expected. '
268 + 'Actual: ${_callbacksCalled}, expected: ${expected}', ''); 268 'Actual: ${_callbacksCalled}, expected: ${expected}', '');
269 _state = _UNCAUGHT_ERROR; 269 _state = _UNCAUGHT_ERROR;
270 } else if ((_callbacksCalled == testCase.callbacks) && 270 } else if ((_callbacksCalled == testCase.callbacks) &&
271 (_state != _RUNNING_TEST)) { 271 (_state != _RUNNING_TEST)) {
272 if (testCase.result == null) testCase.pass(); 272 if (testCase.result == null) testCase.pass();
273 _currentTest++; 273 _currentTest++;
274 _testRunner(); 274 _testRunner();
275 } 275 }
276 } 276 }
277 277
278 void notifyError(String msg, String trace) { 278 void notifyError(String msg, String trace) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 404 }
405 _config.onInit(); 405 _config.onInit();
406 406
407 // Immediately queue the suite up. It will run after a timeout (i.e. after 407 // Immediately queue the suite up. It will run after a timeout (i.e. after
408 // main() has returned). 408 // main() has returned).
409 _defer(_runTests); 409 _defer(_runTests);
410 } 410 }
411 411
412 /** Signature for a test function. */ 412 /** Signature for a test function. */
413 typedef void TestFunction(); 413 typedef void TestFunction();
OLDNEW
« no previous file with comments | « lib/json/json.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698