Chromium Code Reviews| Index: pkg/unittest/lib/src/config.dart |
| diff --git a/pkg/unittest/lib/src/config.dart b/pkg/unittest/lib/src/config.dart |
| index b557783464d9a40ae055e264b5669bf7c2c7bb9e..da9d3fd1ca0883e3fd223c243853c513b6c4e9db 100644 |
| --- a/pkg/unittest/lib/src/config.dart |
| +++ b/pkg/unittest/lib/src/config.dart |
| @@ -21,13 +21,13 @@ class Configuration { |
| * Particularly useful in cases where we have parent/child configurations |
| * such as layout tests. |
| */ |
| - String get name => 'Configuration'; |
| + final String name = 'Configuration'; |
|
kevmoo-old
2013/03/29 02:19:25
Silly to have const values for getters. final is c
Andrei Mouravski
2013/03/29 13:34:09
Also silly to use final instead of const. Also rem
kevmoo-old
2013/03/29 14:38:36
At the moment, I'm playing a game against dart_doc
kevmoo-old
2013/04/01 19:14:36
Related dart_doc bug: https://code.google.com/p/da
|
| /** |
| * If true, then tests are started automatically (otherwise [runTests] |
| * must be called explicitly after the tests are set up. |
| */ |
| - bool get autoStart => true; |
| + final bool autoStart = true; |
| /** |
| * Called as soon as the unittest framework becomes initialized. This is done |
| @@ -70,21 +70,6 @@ class Configuration { |
| } |
| /** |
| - * Can be called by tests to log status. Tests should use this |
|
kevmoo-old
2013/03/29 02:19:25
Adds no value over the top-level logMessage method
|
| - * instead of print. Subclasses should not override this; they |
| - * should instead override logMessage which is passed the test case. |
| - */ |
| - void logMessage(String message) { |
| - if (currentTestCase == null) { |
| - // Before or after tests run. In this case we pass null for the test |
| - // case reference and let the config decide what to do with this. |
| - logTestCaseMessage(null, message); |
| - } else { |
| - logTestCaseMessage(currentTestCase, message); |
| - } |
| - } |
| - |
| - /** |
| * Handles the logging of messages by a test case. The default in |
| * this base configuration is to call print(); |
| */ |
| @@ -103,7 +88,7 @@ class Configuration { |
| void onSummary(int passed, int failed, int errors, List<TestCase> results, |
| String uncaughtError) { |
| // Print each test's result. |
| - for (final t in testCases) { |
| + for (final t in results) { |
|
kevmoo-old
2013/03/29 02:19:25
Should use the method arg
|
| var resultString = "${t.result}".toUpperCase(); |
| print('$resultString: ${t.description}'); |
| @@ -119,13 +104,11 @@ class Configuration { |
| // Show the summary. |
| print(''); |
| - var success = false; |
|
kevmoo-old
2013/03/29 02:19:25
Not used
|
| if (passed == 0 && failed == 0 && errors == 0 && uncaughtError == null) { |
| print('No tests found.'); |
| // This is considered a failure too. |
| } else if (failed == 0 && errors == 0 && uncaughtError == null) { |
| print('All $passed tests passed.'); |
| - success = true; |
| } else { |
| if (uncaughtError != null) { |
| print('Top-level uncaught error: $uncaughtError'); |