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

Side by Side Diff: pkg/analysis_server/test/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.analysis.reanalyze;
6
7 import '../reflective_tests.dart';
8 import 'package:unittest/unittest.dart';
9 import '../analysis_abstract.dart';
10 import 'package:analyzer/src/generated/engine.dart';
11 import 'package:analysis_server/src/protocol.dart';
12 import 'package:analysis_server/src/constants.dart';
scheglov 2014/09/10 01:55:54 Sort imports.
Paul Berry 2014/09/10 18:26:12 Done.
13
14
15 main() {
16 groupSep = ' | ';
17 runReflectiveTests(ReanalyzeTest);
18 }
19
20
21 @ReflectiveTestCase()
22 class ReanalyzeTest extends AbstractAnalysisTest {
23 test_reanalyze() {
24 createProject();
25 List<AnalysisContext> contexts = server.folderMap.values.toList();
26 expect(contexts, hasLength(1));
27 AnalysisContext oldContext = contexts[0];
28 // Reanalyze should cause a brand new context to be built.
29 Request request = new Request("0", ANALYSIS_REANALYZE);
30 handleSuccessfulRequest(request);
31 contexts = server.folderMap.values.toList();
32 expect(contexts, hasLength(1));
33 AnalysisContext newContext = contexts[0];
34 expect(newContext, isNot(same(oldContext)));
35 }
36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698