Chromium Code Reviews| 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.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 } | |
| OLD | NEW |