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

Side by Side Diff: pkg/analyzer/test/src/summary/summarize_elements_test.dart

Issue 1615073007: Add a test of summaries that uses strong mode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix test failures Created 4 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
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 library analyzer.test.src.summary.summarize_elements_test; 5 library analyzer.test.src.summary.summarize_elements_test;
6 6
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/src/generated/engine.dart'; 8 import 'package:analyzer/src/generated/engine.dart';
9 import 'package:analyzer/src/generated/source.dart'; 9 import 'package:analyzer/src/generated/source.dart';
10 import 'package:analyzer/src/generated/source_io.dart'; 10 import 'package:analyzer/src/generated/source_io.dart';
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 @override 47 @override
48 List<UnlinkedUnit> unlinkedUnits; 48 List<UnlinkedUnit> unlinkedUnits;
49 49
50 @override 50 @override
51 bool get checkAstDerivedData => false; 51 bool get checkAstDerivedData => false;
52 52
53 @override 53 @override
54 bool get expectAbsoluteUrisInDependencies => true; 54 bool get expectAbsoluteUrisInDependencies => true;
55 55
56 /**
57 * Determine the analysis options that should be used for this test.
58 */
59 AnalysisOptionsImpl get options =>
60 new AnalysisOptionsImpl()..enableGenericMethods = true;
61
56 @override 62 @override
57 bool get skipFullyLinkedData => false; 63 bool get skipFullyLinkedData => false;
58 64
59 @override 65 @override
60 Source addNamedSource(String filePath, String contents) { 66 Source addNamedSource(String filePath, String contents) {
61 Source source = super.addNamedSource(filePath, contents); 67 Source source = super.addNamedSource(filePath, contents);
62 _fileContents[source] = contents; 68 _fileContents[source] = contents;
63 return source; 69 return source;
64 } 70 }
65 71
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 for (int i = 0; i < linked.units.length; i++) { 110 for (int i = 0; i < linked.units.length; i++) {
105 expect(unlinkedUnits[i].references.length, 111 expect(unlinkedUnits[i].references.length,
106 lessThanOrEqualTo(linked.units[i].references.length)); 112 lessThanOrEqualTo(linked.units[i].references.length));
107 } 113 }
108 verifyPublicNamespace(); 114 verifyPublicNamespace();
109 } 115 }
110 116
111 @override 117 @override
112 void setUp() { 118 void setUp() {
113 super.setUp(); 119 super.setUp();
114 AnalysisOptionsImpl options = new AnalysisOptionsImpl();
115 options.enableGenericMethods = true;
116 resetWithOptions(options); 120 resetWithOptions(options);
117 } 121 }
118 122
119 test_class_no_superclass() { 123 test_class_no_superclass() {
120 UnlinkedClass cls = serializeClassElement(typeProvider.objectType.element); 124 UnlinkedClass cls = serializeClassElement(typeProvider.objectType.element);
121 expect(cls.supertype, isNull); 125 expect(cls.supertype, isNull);
122 expect(cls.hasNoSupertype, isTrue); 126 expect(cls.hasNoSupertype, isTrue);
123 } 127 }
124 128
125 /** 129 /**
(...skipping 12 matching lines...) Expand all
138 } else { 142 } else {
139 UnlinkedPublicNamespace namespace = 143 UnlinkedPublicNamespace namespace =
140 computePublicNamespaceFromText(text, source); 144 computePublicNamespaceFromText(text, source);
141 expect(canonicalize(namespace), 145 expect(canonicalize(namespace),
142 canonicalize(unlinkedUnits[i].publicNamespace), 146 canonicalize(unlinkedUnits[i].publicNamespace),
143 reason: 'publicNamespace(${unitUris[i]})'); 147 reason: 'publicNamespace(${unitUris[i]})');
144 } 148 }
145 } 149 }
146 } 150 }
147 } 151 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/summarize_elements_strong_test.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698