| 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 // Test the basic StreamController and StreamController.singleSubscription. | 5 // Test the basic StreamController and StreamController.singleSubscription. |
| 6 library stream_join_test; | 6 library stream_join_test; |
| 7 | 7 |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 import 'event_helper.dart'; | 9 import 'event_helper.dart'; |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:test/test.dart'; |
| 11 import "package:expect/expect.dart"; | |
| 12 | 11 |
| 13 main() { | 12 main() { |
| 14 test("join-empty", () { | 13 test("join-empty", () { |
| 15 StreamController c = new StreamController(); | 14 StreamController c = new StreamController(); |
| 16 c.stream.join("X").then(expectAsync( | 15 c.stream.join("X").then(expectAsync( |
| 17 (String s) => expect(s, equals("")) | 16 (String s) => expect(s, equals("")) |
| 18 )); | 17 )); |
| 19 c.close(); | 18 c.close(); |
| 20 }); | 19 }); |
| 21 | 20 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 class Foo { | 65 class Foo { |
| 67 String value; | 66 String value; |
| 68 Foo(this.value); | 67 Foo(this.value); |
| 69 String toString() => value; | 68 String toString() => value; |
| 70 } | 69 } |
| 71 | 70 |
| 72 class Bad { | 71 class Bad { |
| 73 Bad(); | 72 Bad(); |
| 74 String toString() => throw "BAD!"; | 73 String toString() => throw "BAD!"; |
| 75 } | 74 } |
| OLD | NEW |