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

Side by Side Diff: pkg/analyzer/test/src/dart/analysis/base.dart

Issue 2995553002: Implement type inference for asserts in constructor initializers. (Closed)
Patch Set: Created 3 years, 4 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
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/strong/front_end_inference_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 'package:analyzer/dart/element/element.dart'; 5 import 'package:analyzer/dart/element/element.dart';
6 import 'package:analyzer/dart/element/visitor.dart'; 6 import 'package:analyzer/dart/element/visitor.dart';
7 import 'package:analyzer/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:analyzer/source/package_map_resolver.dart'; 9 import 'package:analyzer/source/package_map_resolver.dart';
10 import 'package:analyzer/src/dart/analysis/driver.dart'; 10 import 'package:analyzer/src/dart/analysis/driver.dart';
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 contentOverlay, 85 contentOverlay,
86 null, 86 null,
87 new SourceFactory([ 87 new SourceFactory([
88 new DartUriResolver(sdk), 88 new DartUriResolver(sdk),
89 generatedUriResolver, 89 generatedUriResolver,
90 new PackageMapUriResolver(provider, <String, List<Folder>>{ 90 new PackageMapUriResolver(provider, <String, List<Folder>>{
91 'test': [provider.getFolder(testProject)] 91 'test': [provider.getFolder(testProject)]
92 }), 92 }),
93 new ResourceUriResolver(provider) 93 new ResourceUriResolver(provider)
94 ], null, provider), 94 ], null, provider),
95 new AnalysisOptionsImpl() 95 createAnalysisOptions(),
96 ..strongMode = true
97 ..enableUriInPartOf = true,
98 disableChangesAndCacheAllResults: disableChangesAndCacheAllResults, 96 disableChangesAndCacheAllResults: disableChangesAndCacheAllResults,
99 externalSummaries: externalSummaries); 97 externalSummaries: externalSummaries);
100 } 98 }
101 99
100 AnalysisOptionsImpl createAnalysisOptions() => new AnalysisOptionsImpl()
101 ..strongMode = true
102 ..enableUriInPartOf = true;
103
102 int findOffset(String search) { 104 int findOffset(String search) {
103 int offset = testCode.indexOf(search); 105 int offset = testCode.indexOf(search);
104 if (offset < 0) { 106 if (offset < 0) {
105 fail("Did not find '$search' in\n$testCode"); 107 fail("Did not find '$search' in\n$testCode");
106 } 108 }
107 return offset; 109 return offset;
108 } 110 }
109 111
110 int getLeadingIdentifierLength(String search) { 112 int getLeadingIdentifierLength(String search) {
111 int length = 0; 113 int length = 0;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 156
155 _ElementVisitorFunctionWrapper(this.function); 157 _ElementVisitorFunctionWrapper(this.function);
156 158
157 visitElement(Element element) { 159 visitElement(Element element) {
158 function(element); 160 function(element);
159 super.visitElement(element); 161 super.visitElement(element);
160 } 162 }
161 } 163 }
162 164
163 class _GeneratedUriResolverMock extends Mock implements UriResolver {} 165 class _GeneratedUriResolverMock extends Mock implements UriResolver {}
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/strong/front_end_inference_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698