| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 library test.integration.analysis.reanalyze; |
| 6 |
| 7 import '../../reflective_tests.dart'; |
| 8 import 'package:unittest/unittest.dart'; |
| 9 |
| 10 import '../integration_tests.dart'; |
| 11 |
| 12 @ReflectiveTestCase() |
| 13 class Test extends AbstractAnalysisServerIntegrationTest { |
| 14 test_reanalyze() { |
| 15 String pathname = sourcePath('test.dart'); |
| 16 String text = 'main() {}'; |
| 17 writeFile(pathname, text); |
| 18 standardAnalysisSetup(); |
| 19 return analysisFinished.then((_) { |
| 20 // Make sure that reanalyze causes analysis to restart. |
| 21 bool analysisRestarted = false; |
| 22 onServerStatus.listen((data) { |
| 23 if (data.containsKey('analysis')) { |
| 24 if (data['analysis']['isAnalyzing']) { |
| 25 analysisRestarted = true; |
| 26 } |
| 27 } |
| 28 }); |
| 29 sendAnalysisReanalyze(); |
| 30 return analysisFinished.then((_) { |
| 31 expect(analysisRestarted, isTrue); |
| 32 }); |
| 33 }); |
| 34 } |
| 35 } |
| 36 |
| 37 main() { |
| 38 runReflectiveTests(Test); |
| 39 } |
| OLD | NEW |