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

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

Issue 683673004: Fix issue 21379 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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:collection'; 10 import 'dart:collection';
(...skipping 2793 matching lines...) Expand 10 before | Expand all | Expand 10 after
2804 void test_removeResolution_single() { 2804 void test_removeResolution_single() {
2805 Source source1 = new TestSource(); 2805 Source source1 = new TestSource();
2806 DartEntry entry = new DartEntry(); 2806 DartEntry entry = new DartEntry();
2807 entry.setValueInLibrary( 2807 entry.setValueInLibrary(
2808 DartEntry.RESOLVED_UNIT, 2808 DartEntry.RESOLVED_UNIT,
2809 source1, 2809 source1,
2810 AstFactory.compilationUnit()); 2810 AstFactory.compilationUnit());
2811 entry.removeResolution(source1); 2811 entry.removeResolution(source1);
2812 } 2812 }
2813 2813
2814 void test_resolvableCompilationUnit_builtUnit() {
2815 Source librarySource = new TestSource('/lib.dart');
2816 CompilationUnit unit = AstFactory.compilationUnit();
2817 CompilationUnitElement element = ElementFactory.compilationUnit('test.dart') ;
2818 unit.element = element;
2819 DartEntry entry = new DartEntry();
2820 entry.setState(DartEntry.PARSED_UNIT, CacheState.FLUSHED);
2821 entry.setValueInLibrary(DartEntry.BUILT_UNIT, librarySource, unit);
2822 entry.invalidateAllResolutionInformation(false);
2823 CompilationUnit resolvableUnit = entry.resolvableCompilationUnit;
2824 expect(resolvableUnit, isNotNull);
2825 expect(resolvableUnit.element, isNull);
2826 expect(entry.resolvableCompilationUnit, isNull);
2827 }
2828
2829 void test_resolvableCompilationUnit_none() {
2830 DartEntry entry = new DartEntry();
2831 expect(entry.resolvableCompilationUnit, isNull);
2832 }
2833
2834 void test_resolvableCompilationUnit_parsed() {
2835 CompilationUnit unit = AstFactory.compilationUnit();
2836 DartEntry entry = new DartEntry();
2837 entry.setValue(DartEntry.PARSED_UNIT, unit);
2838 expect(entry.resolvableCompilationUnit, unit);
2839 expect(entry.resolvableCompilationUnit, isNull);
2840 }
2841
2842 void test_resolvableCompilationUnit_resolved() {
2843 Source librarySource = new TestSource('/lib.dart');
2844 CompilationUnit unit = AstFactory.compilationUnit();
2845 CompilationUnitElement element = ElementFactory.compilationUnit('test.dart') ;
2846 unit.element = element;
2847 DartEntry entry = new DartEntry();
2848 entry.setState(DartEntry.PARSED_UNIT, CacheState.FLUSHED);
2849 entry.setValueInLibrary(DartEntry.RESOLVED_UNIT, librarySource, unit);
2850 entry.invalidateAllResolutionInformation(false);
2851 CompilationUnit resolvableUnit = entry.resolvableCompilationUnit;
2852 expect(resolvableUnit, isNotNull);
2853 expect(resolvableUnit.element, isNull);
2854 expect(entry.resolvableCompilationUnit, isNull);
2855 }
2856
2814 void test_setState_element() { 2857 void test_setState_element() {
2815 _setState(DartEntry.ELEMENT); 2858 _setState(DartEntry.ELEMENT);
2816 } 2859 }
2817 2860
2818 void test_setState_exportedLibraries() { 2861 void test_setState_exportedLibraries() {
2819 _setState(DartEntry.EXPORTED_LIBRARIES); 2862 _setState(DartEntry.EXPORTED_LIBRARIES);
2820 } 2863 }
2821 2864
2822 void test_setState_hints() { 2865 void test_setState_hints() {
2823 _setStateInLibrary(DartEntry.HINTS); 2866 _setStateInLibrary(DartEntry.HINTS);
(...skipping 3868 matching lines...) Expand 10 before | Expand all | Expand 10 after
6692 } 6735 }
6693 } 6736 }
6694 6737
6695 6738
6696 class _UniversalCachePartitionTest_test_setMaxCacheSize implements 6739 class _UniversalCachePartitionTest_test_setMaxCacheSize implements
6697 CacheRetentionPolicy { 6740 CacheRetentionPolicy {
6698 @override 6741 @override
6699 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) => 6742 RetentionPriority getAstPriority(Source source, SourceEntry sourceEntry) =>
6700 RetentionPriority.LOW; 6743 RetentionPriority.LOW;
6701 } 6744 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/engine.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698