| Index: frog/tests/frog/src/unittest_node.dart
|
| diff --git a/frog/tests/frog/src/unittest_node.dart b/frog/tests/frog/src/unittest_node.dart
|
| index 815150cc74936d1f2a5c7e0228aaad7a6ba7babd..c089a737665b3493af5f8e2a4e17dcd284da68f4 100644
|
| --- a/frog/tests/frog/src/unittest_node.dart
|
| +++ b/frog/tests/frog/src/unittest_node.dart
|
| @@ -7,40 +7,18 @@
|
| // node library.
|
| #library("unittest");
|
|
|
| +#import('dart:isolate');
|
| #import('../../../lib/node/node.dart');
|
| -#source('../../../../lib/unittest/shared.dart');
|
| -
|
| -_platformInitialize() {
|
| - // Do nothing.
|
| -}
|
|
|
| -_platformDefer(void callback()) {
|
| - setTimeout(callback, 0);
|
| -}
|
| -
|
| -_platformStartTests() {
|
| - // Do nothing.
|
| -}
|
| -
|
| -_platformCompleteTests(int testsPassed, int testsFailed, int testsErrors) {
|
| - // Print each test's result.
|
| - for (final test in _tests) {
|
| - print('${test.result.toUpperCase()}: ${test.description}');
|
| +#source('../../../../lib/unittest/config.dart');
|
| +#source('../../../../lib/unittest/shared.dart');
|
|
|
| - if (test.message != '') {
|
| - print(' ${test.message}');
|
| +class PlatformConfiguration extends Configuration {
|
| + void onDone(int passed, int failed, int errors, List<TestCase> results) {
|
| + try {
|
| + super.onDone(passed, failed, errors, results);
|
| + } catch (Exception e) {
|
| + process.exit(1);
|
| }
|
| }
|
| -
|
| - // Show the summary.
|
| - print('');
|
| -
|
| - if (testsPassed == 0 && testsFailed == 0 && testsErrors == 0) {
|
| - print('No tests found.');
|
| - } else if (testsFailed == 0 && testsErrors == 0) {
|
| - print('All $testsPassed tests passed.');
|
| - } else {
|
| - print('$testsPassed PASSED, $testsFailed FAILED, $testsErrors ERRORS');
|
| - process.exit(1);
|
| - }
|
| }
|
|
|