| 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 engine.engine_test; | 5 library engine.engine_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/file_system/memory_file_system.dart'; | 10 import 'package:analyzer/file_system/memory_file_system.dart'; |
| (...skipping 2333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2344 | 2344 |
| 2345 @reflectiveTest | 2345 @reflectiveTest |
| 2346 class AnalysisOptionsImplTest extends EngineTestCase { | 2346 class AnalysisOptionsImplTest extends EngineTestCase { |
| 2347 void test_AnalysisOptionsImpl_copy() { | 2347 void test_AnalysisOptionsImpl_copy() { |
| 2348 bool booleanValue = true; | 2348 bool booleanValue = true; |
| 2349 for (int i = 0; i < 2; i++, booleanValue = !booleanValue) { | 2349 for (int i = 0; i < 2; i++, booleanValue = !booleanValue) { |
| 2350 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); | 2350 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); |
| 2351 options.analyzeFunctionBodies = booleanValue; | 2351 options.analyzeFunctionBodies = booleanValue; |
| 2352 options.cacheSize = i; | 2352 options.cacheSize = i; |
| 2353 options.dart2jsHint = booleanValue; | 2353 options.dart2jsHint = booleanValue; |
| 2354 options.enableGenericMethods = booleanValue; |
| 2354 options.enableStrictCallChecks = booleanValue; | 2355 options.enableStrictCallChecks = booleanValue; |
| 2355 options.enableSuperMixins = booleanValue; | 2356 options.enableSuperMixins = booleanValue; |
| 2356 options.generateImplicitErrors = booleanValue; | 2357 options.generateImplicitErrors = booleanValue; |
| 2357 options.generateSdkErrors = booleanValue; | 2358 options.generateSdkErrors = booleanValue; |
| 2358 options.hint = booleanValue; | 2359 options.hint = booleanValue; |
| 2359 options.incremental = booleanValue; | 2360 options.incremental = booleanValue; |
| 2360 options.preserveComments = booleanValue; | 2361 options.preserveComments = booleanValue; |
| 2361 options.strongMode = booleanValue; | 2362 options.strongMode = booleanValue; |
| 2362 AnalysisOptionsImpl copy = new AnalysisOptionsImpl.from(options); | 2363 AnalysisOptionsImpl copy = new AnalysisOptionsImpl.from(options); |
| 2363 expect(copy.analyzeFunctionBodies, options.analyzeFunctionBodies); | 2364 expect(copy.analyzeFunctionBodies, options.analyzeFunctionBodies); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 2389 expect(options.cacheSize, value); | 2390 expect(options.cacheSize, value); |
| 2390 } | 2391 } |
| 2391 | 2392 |
| 2392 void test_dart2jsHint() { | 2393 void test_dart2jsHint() { |
| 2393 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); | 2394 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); |
| 2394 bool value = !options.dart2jsHint; | 2395 bool value = !options.dart2jsHint; |
| 2395 options.dart2jsHint = value; | 2396 options.dart2jsHint = value; |
| 2396 expect(options.dart2jsHint, value); | 2397 expect(options.dart2jsHint, value); |
| 2397 } | 2398 } |
| 2398 | 2399 |
| 2400 void test_enableGenericMethods() { |
| 2401 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); |
| 2402 bool value = !options.enableGenericMethods; |
| 2403 options.enableGenericMethods = value; |
| 2404 expect(options.enableGenericMethods, value); |
| 2405 } |
| 2406 |
| 2399 void test_enableSuperMixins() { | 2407 void test_enableSuperMixins() { |
| 2400 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); | 2408 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); |
| 2401 bool value = !options.enableSuperMixins; | 2409 bool value = !options.enableSuperMixins; |
| 2402 options.enableSuperMixins = value; | 2410 options.enableSuperMixins = value; |
| 2403 expect(options.enableSuperMixins, value); | 2411 expect(options.enableSuperMixins, value); |
| 2404 } | 2412 } |
| 2405 | 2413 |
| 2406 void test_generateImplicitErrors() { | 2414 void test_generateImplicitErrors() { |
| 2407 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); | 2415 AnalysisOptionsImpl options = new AnalysisOptionsImpl(); |
| 2408 bool value = !options.generateImplicitErrors; | 2416 bool value = !options.generateImplicitErrors; |
| (...skipping 4630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7039 @override | 7047 @override |
| 7040 bool exists() => true; | 7048 bool exists() => true; |
| 7041 } | 7049 } |
| 7042 | 7050 |
| 7043 class _UniversalCachePartitionTest_test_setMaxCacheSize | 7051 class _UniversalCachePartitionTest_test_setMaxCacheSize |
| 7044 implements CacheRetentionPolicy { | 7052 implements CacheRetentionPolicy { |
| 7045 @override | 7053 @override |
| 7046 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) => | 7054 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) => |
| 7047 RetentionPriority.LOW; | 7055 RetentionPriority.LOW; |
| 7048 } | 7056 } |
| OLD | NEW |