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

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

Issue 10031022: step 1 in making unittest platform independent. (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
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
Bob Nystrom 2012/04/10 00:30:31 This file can be deleted now that we don't support
Siggi Cherem (dart-lang) 2012/04/10 01:05:28 Done.
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 entrypoint for running tests on node compiled with frog. 6 * A simple unit test entrypoint for running tests on node compiled with frog.
7 */ 7 */
8 #library("unittest"); 8 #library("unittest");
9 9
10 #import('../../../frog/lib/node/node.dart'); 10 #import('../../../frog/lib/node/node.dart');
11 11
12 #source("config.dart");
12 #source("shared.dart"); 13 #source("shared.dart");
13 14
14 _platformInitialize() { 15 _platformInitialize() {
15 // Do nothing. 16 // Do nothing.
16 } 17 }
17 18
18 _platformDefer(void callback()) { 19 _platformDefer(void callback()) {
19 setTimeout(callback, 0); 20 setTimeout(callback, 0);
20 } 21 }
21 22
(...skipping 22 matching lines...) Expand all
44 } else if (testsFailed == 0 && testsErrors == 0) { 45 } else if (testsFailed == 0 && testsErrors == 0) {
45 print('All $testsPassed tests passed.'); 46 print('All $testsPassed tests passed.');
46 success = true; 47 success = true;
47 } else { 48 } else {
48 print('$testsPassed PASSED, $testsFailed FAILED, $testsErrors ERRORS'); 49 print('$testsPassed PASSED, $testsFailed FAILED, $testsErrors ERRORS');
49 } 50 }
50 51
51 // 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.
52 if (!success) process.exit(1); 53 if (!success) process.exit(1);
53 } 54 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698