| 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 library analyzer.test.src.context.context_test; | 5 library analyzer.test.src.context.context_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 2525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2536 resourceResolver, | 2536 resourceResolver, |
| 2537 new PackageMapUriResolver(resourceProvider, { | 2537 new PackageMapUriResolver(resourceProvider, { |
| 2538 'crypto': [resourceProvider.getFolder('/pkgs/crypto-2/lib')] | 2538 'crypto': [resourceProvider.getFolder('/pkgs/crypto-2/lib')] |
| 2539 }) | 2539 }) |
| 2540 ]); | 2540 ]); |
| 2541 _analyzeAll_assertFinished(); | 2541 _analyzeAll_assertFinished(); |
| 2542 _assertNoExceptions(); | 2542 _assertNoExceptions(); |
| 2543 } | 2543 } |
| 2544 | 2544 |
| 2545 void test_resolveCompilationUnit_existingElementModel() { | 2545 void test_resolveCompilationUnit_existingElementModel() { |
| 2546 prepareAnalysisContext(new AnalysisOptionsImpl() | 2546 prepareAnalysisContext(new AnalysisOptionsImpl()..strongMode = true); |
| 2547 ..enableGenericMethods = true | |
| 2548 ..strongMode = true); | |
| 2549 Source source = addSource( | 2547 Source source = addSource( |
| 2550 '/test.dart', | 2548 '/test.dart', |
| 2551 r''' | 2549 r''' |
| 2552 library test; | 2550 library test; |
| 2553 | 2551 |
| 2554 String topLevelVariable; | 2552 String topLevelVariable; |
| 2555 int get topLevelGetter => 0; | 2553 int get topLevelGetter => 0; |
| 2556 void set topLevelSetter(int value) {} | 2554 void set topLevelSetter(int value) {} |
| 2557 String topLevelFunction(int i) => ''; | 2555 String topLevelFunction(int i) => ''; |
| 2558 | 2556 |
| (...skipping 2888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5447 * Initialize the visitor. | 5445 * Initialize the visitor. |
| 5448 */ | 5446 */ |
| 5449 _ElementGatherer(); | 5447 _ElementGatherer(); |
| 5450 | 5448 |
| 5451 @override | 5449 @override |
| 5452 void visitElement(Element element) { | 5450 void visitElement(Element element) { |
| 5453 elements[element] = element; | 5451 elements[element] = element; |
| 5454 super.visitElement(element); | 5452 super.visitElement(element); |
| 5455 } | 5453 } |
| 5456 } | 5454 } |
| OLD | NEW |