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

Side by Side Diff: client/testing/unittest/unittest_vm.dart

Issue 9597015: Update Timer API to take the callback as the last parameter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | runtime/bin/chunked_stream.dart » ('j') | 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) 2012, 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 simple unit test library for running tests on the VM. 6 * A simple unit test library for running tests on the VM.
7 */ 7 */
8 #library('unittest'); 8 #library('unittest');
9 9
10 #import('dart:io'); 10 #import('dart:io');
11 #source('shared.dart'); 11 #source('shared.dart');
12 12
13 _platformInitialize() { 13 _platformInitialize() {
14 // Do nothing. 14 // Do nothing.
15 } 15 }
16 16
17 _platformDefer(void callback()) { 17 _platformDefer(void callback()) {
18 new Timer((timer) { 18 new Timer(0, (timer) {
19 callback(); 19 callback();
20 }, 0); 20 });
21 } 21 }
22 22
23 _platformStartTests() { 23 _platformStartTests() {
24 // Do nothing. 24 // Do nothing.
25 } 25 }
26 26
27 _platformCompleteTests(int testsPassed, int testsFailed, int testsErrors) { 27 _platformCompleteTests(int testsPassed, int testsFailed, int testsErrors) {
28 // Print each test's result. 28 // Print each test's result.
29 for (final test in _tests) { 29 for (final test in _tests) {
30 print('${test.result.toUpperCase()}: ${test.description}'); 30 print('${test.result.toUpperCase()}: ${test.description}');
(...skipping 14 matching lines...) Expand all
45 } else if (testsFailed == 0 && testsErrors == 0) { 45 } else if (testsFailed == 0 && testsErrors == 0) {
46 print('All $testsPassed tests passed.'); 46 print('All $testsPassed tests passed.');
47 success = true; 47 success = true;
48 } else { 48 } else {
49 print('$testsPassed PASSED, $testsFailed FAILED, $testsErrors ERRORS'); 49 print('$testsPassed PASSED, $testsFailed FAILED, $testsErrors ERRORS');
50 } 50 }
51 51
52 // A non-zero exit code is used by the test infrastructure to detect failure. 52 // A non-zero exit code is used by the test infrastructure to detect failure.
53 if (!success) exit(1); 53 if (!success) exit(1);
54 } 54 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/chunked_stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698