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