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

Side by Side Diff: pkg/analyzer/test/generated/engine_test.dart

Issue 829133007: Enable enum and deferred import support (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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
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 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.engine_test; 8 library engine.engine_test;
9 9
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 @override 212 @override
213 void setUp() { 213 void setUp() {
214 _context = new AnalysisContextImpl(); 214 _context = new AnalysisContextImpl();
215 _sourceFactory = new SourceFactory( 215 _sourceFactory = new SourceFactory(
216 [new DartUriResolver(DirectoryBasedDartSdk.defaultSdk), new FileUriResol ver()]); 216 [new DartUriResolver(DirectoryBasedDartSdk.defaultSdk), new FileUriResol ver()]);
217 _context.sourceFactory = _sourceFactory; 217 _context.sourceFactory = _sourceFactory;
218 AnalysisOptionsImpl options = 218 AnalysisOptionsImpl options =
219 new AnalysisOptionsImpl.con1(_context.analysisOptions); 219 new AnalysisOptionsImpl.con1(_context.analysisOptions);
220 options.cacheSize = 256; 220 options.cacheSize = 256;
221 options.enableEnum = true;
222 _context.analysisOptions = options; 221 _context.analysisOptions = options;
223 } 222 }
224 223
225 @override 224 @override
226 void tearDown() { 225 void tearDown() {
227 _context = null; 226 _context = null;
228 _sourceFactory = null; 227 _sourceFactory = null;
229 super.tearDown(); 228 super.tearDown();
230 } 229 }
231 230
(...skipping 2013 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 class AnalysisOptionsImplTest extends EngineTestCase { 2244 class AnalysisOptionsImplTest extends EngineTestCase {
2246 void test_AnalysisOptionsImpl_copy() { 2245 void test_AnalysisOptionsImpl_copy() {
2247 bool booleanValue = true; 2246 bool booleanValue = true;
2248 for (int i = 0; i < 2; i++, booleanValue = !booleanValue) { 2247 for (int i = 0; i < 2; i++, booleanValue = !booleanValue) {
2249 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); 2248 AnalysisOptionsImpl options = new AnalysisOptionsImpl();
2250 options.analyzeAngular = booleanValue; 2249 options.analyzeAngular = booleanValue;
2251 options.analyzeFunctionBodies = booleanValue; 2250 options.analyzeFunctionBodies = booleanValue;
2252 options.analyzePolymer = booleanValue; 2251 options.analyzePolymer = booleanValue;
2253 options.cacheSize = i; 2252 options.cacheSize = i;
2254 options.dart2jsHint = booleanValue; 2253 options.dart2jsHint = booleanValue;
2255 options.enableDeferredLoading = booleanValue;
2256 options.generateSdkErrors = booleanValue; 2254 options.generateSdkErrors = booleanValue;
2257 options.hint = booleanValue; 2255 options.hint = booleanValue;
2258 options.incremental = booleanValue; 2256 options.incremental = booleanValue;
2259 options.preserveComments = booleanValue; 2257 options.preserveComments = booleanValue;
2260 AnalysisOptionsImpl copy = new AnalysisOptionsImpl.con1(options); 2258 AnalysisOptionsImpl copy = new AnalysisOptionsImpl.con1(options);
2261 expect(copy.analyzeAngular, options.analyzeAngular); 2259 expect(copy.analyzeAngular, options.analyzeAngular);
2262 expect(copy.analyzeFunctionBodies, options.analyzeFunctionBodies); 2260 expect(copy.analyzeFunctionBodies, options.analyzeFunctionBodies);
2263 expect(copy.analyzePolymer, options.analyzePolymer); 2261 expect(copy.analyzePolymer, options.analyzePolymer);
2264 expect(copy.cacheSize, options.cacheSize); 2262 expect(copy.cacheSize, options.cacheSize);
2265 expect(copy.dart2jsHint, options.dart2jsHint); 2263 expect(copy.dart2jsHint, options.dart2jsHint);
2266 expect(copy.enableDeferredLoading, options.enableDeferredLoading);
2267 expect(copy.enableEnum, options.enableEnum);
2268 expect(copy.generateSdkErrors, options.generateSdkErrors); 2264 expect(copy.generateSdkErrors, options.generateSdkErrors);
2269 expect(copy.hint, options.hint); 2265 expect(copy.hint, options.hint);
2270 expect(copy.incremental, options.incremental); 2266 expect(copy.incremental, options.incremental);
2271 expect(copy.preserveComments, options.preserveComments); 2267 expect(copy.preserveComments, options.preserveComments);
2272 } 2268 }
2273 } 2269 }
2274 2270
2275 void test_getAnalyzeAngular() { 2271 void test_getAnalyzeAngular() {
2276 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); 2272 AnalysisOptionsImpl options = new AnalysisOptionsImpl();
2277 bool value = !options.analyzeAngular; 2273 bool value = !options.analyzeAngular;
(...skipping 23 matching lines...) Expand all
2301 expect(options.cacheSize, value); 2297 expect(options.cacheSize, value);
2302 } 2298 }
2303 2299
2304 void test_getDart2jsHint() { 2300 void test_getDart2jsHint() {
2305 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); 2301 AnalysisOptionsImpl options = new AnalysisOptionsImpl();
2306 bool value = !options.dart2jsHint; 2302 bool value = !options.dart2jsHint;
2307 options.dart2jsHint = value; 2303 options.dart2jsHint = value;
2308 expect(options.dart2jsHint, value); 2304 expect(options.dart2jsHint, value);
2309 } 2305 }
2310 2306
2311 void test_getEnableDeferredLoading() {
2312 AnalysisOptionsImpl options = new AnalysisOptionsImpl();
2313 expect(
2314 options.enableDeferredLoading,
2315 AnalysisOptionsImpl.DEFAULT_ENABLE_DEFERRED_LOADING);
2316 bool value = !options.enableDeferredLoading;
2317 options.enableDeferredLoading = value;
2318 expect(options.enableDeferredLoading, value);
2319 }
2320
2321 void test_getEnableEnum() {
2322 AnalysisOptionsImpl options = new AnalysisOptionsImpl();
2323 expect(options.enableEnum, AnalysisOptionsImpl.DEFAULT_ENABLE_ENUM);
2324 bool value = !options.enableEnum;
2325 options.enableEnum = value;
2326 expect(options.enableEnum, value);
2327 }
2328
2329 void test_getGenerateSdkErrors() { 2307 void test_getGenerateSdkErrors() {
2330 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); 2308 AnalysisOptionsImpl options = new AnalysisOptionsImpl();
2331 bool value = !options.generateSdkErrors; 2309 bool value = !options.generateSdkErrors;
2332 options.generateSdkErrors = value; 2310 options.generateSdkErrors = value;
2333 expect(options.generateSdkErrors, value); 2311 expect(options.generateSdkErrors, value);
2334 } 2312 }
2335 2313
2336 void test_getHint() { 2314 void test_getHint() {
2337 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); 2315 AnalysisOptionsImpl options = new AnalysisOptionsImpl();
2338 bool value = !options.hint; 2316 bool value = !options.hint;
(...skipping 4799 matching lines...) Expand 10 before | Expand all | Expand 10 after
7138 bool contains(Source source) => source == libB; 7116 bool contains(Source source) => source == libB;
7139 } 7117 }
7140 7118
7141 7119
7142 class _UniversalCachePartitionTest_test_setMaxCacheSize implements 7120 class _UniversalCachePartitionTest_test_setMaxCacheSize implements
7143 CacheRetentionPolicy { 7121 CacheRetentionPolicy {
7144 @override 7122 @override
7145 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) => 7123 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) =>
7146 RetentionPriority.LOW; 7124 RetentionPriority.LOW;
7147 } 7125 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698