| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 | 6 |
| 7 import 'package:analysis_server/protocol/protocol_generated.dart'; | 7 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 8 import 'package:test/test.dart'; | 8 import 'package:test/test.dart'; |
| 9 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 9 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 if (params.analysis != null) { | 28 if (params.analysis != null) { |
| 29 if (params.analysis.isAnalyzing) { | 29 if (params.analysis.isAnalyzing) { |
| 30 expect(analysisBegun.isCompleted, isFalse); | 30 expect(analysisBegun.isCompleted, isFalse); |
| 31 analysisBegun.complete(); | 31 analysisBegun.complete(); |
| 32 } else { | 32 } else { |
| 33 expect(analysisFinished.isCompleted, isFalse); | 33 expect(analysisFinished.isCompleted, isFalse); |
| 34 analysisFinished.complete(); | 34 analysisFinished.complete(); |
| 35 } | 35 } |
| 36 } | 36 } |
| 37 }); | 37 }); |
| 38 writeFile( | 38 writeFile(sourcePath('test.dart'), ''' |
| 39 sourcePath('test.dart'), | |
| 40 ''' | |
| 41 main() { | 39 main() { |
| 42 var x; | 40 var x; |
| 43 }'''); | 41 }'''); |
| 44 standardAnalysisSetup(); | 42 standardAnalysisSetup(); |
| 45 expect(analysisBegun.isCompleted, isFalse); | 43 expect(analysisBegun.isCompleted, isFalse); |
| 46 expect(analysisFinished.isCompleted, isFalse); | 44 expect(analysisFinished.isCompleted, isFalse); |
| 47 return analysisBegun.future.then((_) { | 45 return analysisBegun.future.then((_) { |
| 48 expect(analysisFinished.isCompleted, isFalse); | 46 expect(analysisFinished.isCompleted, isFalse); |
| 49 return analysisFinished.future; | 47 return analysisFinished.future; |
| 50 }); | 48 }); |
| 51 } | 49 } |
| 52 } | 50 } |
| OLD | NEW |