Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Side by Side Diff: pkg/analysis_server/test/integration/analysis/reanalyze_test.dart

Issue 553193002: Implement "analysis.reanalyze" in analysis server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698