OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 test.integration.server.set.subscriptions; | 5 library test.integration.server.set.subscriptions; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:analysis_server/src/protocol.dart'; | 9 import 'package:analysis_server/src/protocol.dart'; |
10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
11 | 11 |
12 import '../../reflective_tests.dart'; | 12 import '../../reflective_tests.dart'; |
13 import '../integration_tests.dart'; | 13 import '../integration_tests.dart'; |
14 | 14 |
| 15 main() { |
| 16 runReflectiveTests(Test); |
| 17 } |
| 18 |
15 @ReflectiveTestCase() | 19 @ReflectiveTestCase() |
16 class Test extends AbstractAnalysisServerIntegrationTest { | 20 class Test extends AbstractAnalysisServerIntegrationTest { |
17 test_setSubscriptions() { | 21 test_setSubscriptions() { |
18 bool statusReceived = false; | 22 bool statusReceived = false; |
19 Completer analysisBegun = new Completer(); | 23 Completer analysisBegun = new Completer(); |
20 onServerStatus.listen((_) { | 24 onServerStatus.listen((_) { |
21 statusReceived = true; | 25 statusReceived = true; |
22 }); | 26 }); |
23 onAnalysisErrors.listen((_) { | 27 onAnalysisErrors.listen((_) { |
24 if (!analysisBegun.isCompleted) { | 28 if (!analysisBegun.isCompleted) { |
(...skipping 18 matching lines...) Expand all Loading... |
43 var y; | 47 var y; |
44 }'''); | 48 }'''); |
45 // Analysis should eventually complete, and we should be notified | 49 // Analysis should eventually complete, and we should be notified |
46 // about it. | 50 // about it. |
47 return analysisFinished; | 51 return analysisFinished; |
48 }); | 52 }); |
49 }); | 53 }); |
50 }); | 54 }); |
51 } | 55 } |
52 } | 56 } |
53 | |
54 main() { | |
55 runReflectiveTests(Test); | |
56 } | |
OLD | NEW |