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

Unified Diff: pkg/analyzer/test/src/summary/summary_common.dart

Issue 1850673004: Add support for type inference involving generics. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/summary_common.dart
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index c690ab83d24bd3b7c7df332bfe7c2ee8d40045dc..5b7ebd22174aab7925d845ceeb49d1573f39921e 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -231,14 +231,18 @@ abstract class SummaryTest {
* a file reachable via the given [absoluteUri] and [relativeUri].
*/
void checkDependency(int dependency, String absoluteUri, String relativeUri) {
+ expect(dependency, new isInstanceOf<int>());
if (expectAbsoluteUrisInDependencies) {
// The element model doesn't (yet) store enough information to recover
// relative URIs, so we have to use the absolute URI.
// TODO(paulberry): fix this.
- relativeUri = absoluteUri;
+ expect(linked.dependencies[dependency].uri, absoluteUri);
+ } else if (dependency >= linked.numPrelinkedDependencies) {
+ // Fully-linked dependencies are always absolute URIs.
+ expect(linked.dependencies[dependency].uri, absoluteUri);
+ } else {
+ expect(linked.dependencies[dependency].uri, relativeUri);
}
- expect(dependency, new isInstanceOf<int>());
- expect(linked.dependencies[dependency].uri, relativeUri);
}
/**
« no previous file with comments | « pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698