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

Side by Side Diff: lib/unittest/config.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
« no previous file with comments | « no previous file | lib/unittest/html_print.dart » ('j') | lib/unittest/unittest_html.dart » ('J')
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 /** Hooks to configure the unittest library for different platforms. */
6 interface Configuration default _DefaultConfiguration {
7 /**
8 * Called as soon as the unittest framework becomes initialized. This is done
9 * even before tests are added to the test framework. It might be used to
10 * determine/debug errors that occur before the test harness starts executing.
11 */
12 void onInit();
13
14 /**
15 * Called as soon as the unittest framework starts running. Used commonly to
16 * tell the vm or browser that tests are still running and the process should
17 * wait until they are done.
18 */
19 void onStart();
20
21 /**
22 * Called when each test is completed. The default implementation throws an
23 * exception if the test failed. Other implementations might choose to ignore
24 * this callback and present a summary result in [onDone].
25 */
26 void onTestResult(TestCase testCase);
27
28 /**
29 * Called with the result of all test cases. The default implementation prints
30 * the result summary using the built-in [print] command. Browser tests
31 * commonly override this to reformat the output.
32 */
33 void onDone(int passed, int failed, int errors, List<TestCase> results);
34 }
35
36 // TODO(sigmund): make this the default config.
37 //class _DefaultConfiguration() {
38 // void onInit() {}
39 // void onStart() {}
40 // void onResult(TestCase testCase) {
41 // if (testCase.result != _PASS) {
42 // Expect.fail("FAIL: ${testCase.description}");
43 // }
44 // }
45 // void onDone(int passed, int failed, int errors, List<TestCase> results) {
46 // if (failed == 0 && errors == 0) {
47 // print("PASS");
48 // }
49 // }
50 //}
OLDNEW
« no previous file with comments | « no previous file | lib/unittest/html_print.dart » ('j') | lib/unittest/unittest_html.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698