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

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

Issue 8742025: Add unittest entrypoint for node/frog. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 /**
6 * A simple unit test entrypoint for running tests on node compiled with frog.
7 */
8 #library("unittest");
9
10 #import('../../../frog/lib/node/node.dart');
11
12 #source("shared.dart");
13
14 _platformInitialize() {
15 // Do nothing.
16 }
17
18 _platformDefer(void callback()) {
19 setTimeout(callback, 0);
20 }
21
22 _platformStartTests() {
23 // Do nothing.
24 }
25
26 _platformCompleteTests(int testsPassed, int testsFailed, int testsErrors) {
27 // Print each test's result.
28 for (final test in _tests) {
29 print('${test.result.toUpperCase()}: ${test.description}');
30
31 if (test.message != '') {
32 print(' ${test.message}');
33 }
34 }
35
36 // Show the summary.
37 print('');
38
39 if (testsPassed == 0 && testsFailed == 0 && testsErrors == 0) {
40 print('No tests found.');
41 } else if (testsFailed == 0 && testsErrors == 0) {
42 print('All $testsPassed tests passed.');
43 } else {
44 print('$testsPassed PASSED, $testsFailed FAILED, $testsErrors ERRORS');
45 }
46 }
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