| 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.generated.resolver_test; | 5 library analyzer.test.generated.resolver_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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 defineReflectiveTests(LibraryImportScopeTest); | 45 defineReflectiveTests(LibraryImportScopeTest); |
| 46 defineReflectiveTests(LibraryScopeTest); | 46 defineReflectiveTests(LibraryScopeTest); |
| 47 defineReflectiveTests(PrefixedNamespaceTest); | 47 defineReflectiveTests(PrefixedNamespaceTest); |
| 48 defineReflectiveTests(ScopeTest); | 48 defineReflectiveTests(ScopeTest); |
| 49 defineReflectiveTests(StrictModeTest); | 49 defineReflectiveTests(StrictModeTest); |
| 50 defineReflectiveTests(SubtypeManagerTest); | 50 defineReflectiveTests(SubtypeManagerTest); |
| 51 defineReflectiveTests(TypeOverrideManagerTest); | 51 defineReflectiveTests(TypeOverrideManagerTest); |
| 52 defineReflectiveTests(TypePropagationTest); | 52 defineReflectiveTests(TypePropagationTest); |
| 53 defineReflectiveTests(TypeProviderImplTest); | 53 defineReflectiveTests(TypeProviderImplTest); |
| 54 defineReflectiveTests(TypeResolverVisitorTest); | 54 defineReflectiveTests(TypeResolverVisitorTest); |
| 55 defineReflectiveTests(StrictModeTest_Driver); | |
| 56 defineReflectiveTests(TypePropagationTest_Driver); | |
| 57 }); | 55 }); |
| 58 } | 56 } |
| 59 | 57 |
| 60 @reflectiveTest | 58 @reflectiveTest |
| 61 class AnalysisDeltaTest extends EngineTestCase { | 59 class AnalysisDeltaTest extends EngineTestCase { |
| 62 TestSource source1 = new TestSource('/1.dart'); | 60 TestSource source1 = new TestSource('/1.dart'); |
| 63 TestSource source2 = new TestSource('/2.dart'); | 61 TestSource source2 = new TestSource('/2.dart'); |
| 64 TestSource source3 = new TestSource('/3.dart'); | 62 TestSource source3 = new TestSource('/3.dart'); |
| 65 | 63 |
| 66 void test_getAddedSources() { | 64 void test_getAddedSources() { |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 int f() { | 773 int f() { |
| 776 num n = 1234; | 774 num n = 1234; |
| 777 return n & 0x0F; | 775 return n & 0x0F; |
| 778 }'''); | 776 }'''); |
| 779 await computeAnalysisResult(source); | 777 await computeAnalysisResult(source); |
| 780 assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]); | 778 assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]); |
| 781 } | 779 } |
| 782 } | 780 } |
| 783 | 781 |
| 784 @reflectiveTest | 782 @reflectiveTest |
| 785 class StrictModeTest_Driver extends StrictModeTest { | |
| 786 @override | |
| 787 bool get enableNewAnalysisDriver => true; | |
| 788 } | |
| 789 | |
| 790 @reflectiveTest | |
| 791 class SubtypeManagerTest { | 783 class SubtypeManagerTest { |
| 792 /** | 784 /** |
| 793 * The inheritance manager being tested. | 785 * The inheritance manager being tested. |
| 794 */ | 786 */ |
| 795 SubtypeManager _subtypeManager; | 787 SubtypeManager _subtypeManager; |
| 796 | 788 |
| 797 /** | 789 /** |
| 798 * The compilation unit element containing all of the types setup in each test
. | 790 * The compilation unit element containing all of the types setup in each test
. |
| 799 */ | 791 */ |
| 800 CompilationUnitElementImpl _definingCompilationUnit; | 792 CompilationUnitElementImpl _definingCompilationUnit; |
| (...skipping 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2387 TestAnalysisResult analysisResult = await computeAnalysisResult(source); | 2379 TestAnalysisResult analysisResult = await computeAnalysisResult(source); |
| 2388 if (noErrors) { | 2380 if (noErrors) { |
| 2389 assertNoErrors(source); | 2381 assertNoErrors(source); |
| 2390 verify([source]); | 2382 verify([source]); |
| 2391 } | 2383 } |
| 2392 return analysisResult.unit; | 2384 return analysisResult.unit; |
| 2393 } | 2385 } |
| 2394 } | 2386 } |
| 2395 | 2387 |
| 2396 @reflectiveTest | 2388 @reflectiveTest |
| 2397 class TypePropagationTest_Driver extends TypePropagationTest { | |
| 2398 @override | |
| 2399 bool get enableNewAnalysisDriver => true; | |
| 2400 | |
| 2401 @failingTest | |
| 2402 @override | |
| 2403 test_query() { | |
| 2404 return super.test_query(); | |
| 2405 } | |
| 2406 } | |
| 2407 | |
| 2408 @reflectiveTest | |
| 2409 class TypeProviderImplTest extends EngineTestCase { | 2389 class TypeProviderImplTest extends EngineTestCase { |
| 2410 void test_creation() { | 2390 void test_creation() { |
| 2411 // | 2391 // |
| 2412 // Create a mock library element with the types expected to be in dart:core. | 2392 // Create a mock library element with the types expected to be in dart:core. |
| 2413 // We cannot use either ElementFactory or TestTypeProvider (which uses | 2393 // We cannot use either ElementFactory or TestTypeProvider (which uses |
| 2414 // ElementFactory) because we side-effect the elements in ways that would | 2394 // ElementFactory) because we side-effect the elements in ways that would |
| 2415 // break other tests. | 2395 // break other tests. |
| 2416 // | 2396 // |
| 2417 InterfaceType objectType = _classElement("Object", null).type; | 2397 InterfaceType objectType = _classElement("Object", null).type; |
| 2418 InterfaceType boolType = _classElement("bool", objectType).type; | 2398 InterfaceType boolType = _classElement("bool", objectType).type; |
| (...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3609 */ | 3589 */ |
| 3610 class _StaleElement extends ElementImpl { | 3590 class _StaleElement extends ElementImpl { |
| 3611 _StaleElement() : super("_StaleElement", -1); | 3591 _StaleElement() : super("_StaleElement", -1); |
| 3612 | 3592 |
| 3613 @override | 3593 @override |
| 3614 get kind => throw "_StaleElement's kind shouldn't be accessed"; | 3594 get kind => throw "_StaleElement's kind shouldn't be accessed"; |
| 3615 | 3595 |
| 3616 @override | 3596 @override |
| 3617 /*=T*/ accept/*<T>*/(_) => throw "_StaleElement shouldn't be visited"; | 3597 /*=T*/ accept/*<T>*/(_) => throw "_StaleElement shouldn't be visited"; |
| 3618 } | 3598 } |
| OLD | NEW |