| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 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 library error_group_test; | 5 library error_group_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:pub/src/error_group.dart'; |
| 10 import 'package:pub/src/utils.dart'; |
| 9 import 'package:unittest/unittest.dart'; | 11 import 'package:unittest/unittest.dart'; |
| 10 | 12 |
| 11 import '../lib/src/error_group.dart'; | |
| 12 import '../lib/src/utils.dart'; | |
| 13 | |
| 14 ErrorGroup errorGroup; | 13 ErrorGroup errorGroup; |
| 15 | 14 |
| 16 // TODO(nweiz): once there's a global error handler, we should test that it does | 15 // TODO(nweiz): once there's a global error handler, we should test that it does |
| 17 // and does not get called at appropriate times. See issue 5958. | 16 // and does not get called at appropriate times. See issue 5958. |
| 18 // | 17 // |
| 19 // One particular thing we should test that has no tests now is that a stream | 18 // One particular thing we should test that has no tests now is that a stream |
| 20 // that has a subscription added and subsequently canceled counts as having no | 19 // that has a subscription added and subsequently canceled counts as having no |
| 21 // listeners. | 20 // listeners. |
| 22 | 21 |
| 23 main() { | 22 main() { |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 completion(equals(['value1', 'value2']))); | 436 completion(equals(['value1', 'value2']))); |
| 438 controller..add('value1')..add('value2')..close(); | 437 controller..add('value1')..add('value2')..close(); |
| 439 | 438 |
| 440 expect(signal.future.then((_) { | 439 expect(signal.future.then((_) { |
| 441 // shouldn't cause a top-level exception | 440 // shouldn't cause a top-level exception |
| 442 completer.completeError(new FormatException()); | 441 completer.completeError(new FormatException()); |
| 443 }), completes); | 442 }), completes); |
| 444 }); | 443 }); |
| 445 }); | 444 }); |
| 446 } | 445 } |
| OLD | NEW |