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

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

Issue 1575143002: Fix referencing prefixed types from parts. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.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_test.dart
diff --git a/pkg/analyzer/test/src/summary/summary_test.dart b/pkg/analyzer/test/src/summary/summary_test.dart
index 448a92d8ce2e48fe917f03ec0a5376ddb672a5ce..e9031eeb59e3634fa24da5bf5d9ab6d05db55230 100644
--- a/pkg/analyzer/test/src/summary/summary_test.dart
+++ b/pkg/analyzer/test/src/summary/summary_test.dart
@@ -112,9 +112,10 @@ class PrelinkerTest extends SummarizeElementsTest {
summarize_elements.serializeLibrary(
library, analysisContext.typeProvider);
for (int i = 0; i < serializedLibrary.unlinkedUnits.length; i++) {
- uriToNamespace[
- serializedLibrary.unitUris[i]] = new UnlinkedUnit.fromBuffer(
- serializedLibrary.unlinkedUnits[i].toBuffer()).publicNamespace;
+ uriToNamespace[serializedLibrary.unitUris[i]] =
+ new UnlinkedUnit.fromBuffer(
+ serializedLibrary.unlinkedUnits[i].toBuffer())
+ .publicNamespace;
}
}
return uriToNamespace;
@@ -764,7 +765,8 @@ b.C c4;''');
UnlinkedTypeRef serializeTypeText(String text,
{String otherDeclarations: '', bool allowErrors: false}) {
return serializeVariableText('$otherDeclarations\n$text v;',
- allowErrors: allowErrors).type;
+ allowErrors: allowErrors)
+ .type;
}
/**
@@ -1790,7 +1792,8 @@ enum E { v }''';
test_executable_operator_index_set() {
UnlinkedExecutable executable = serializeClassText(
- 'class C { void operator[]=(int i, bool v) => null; }').executables[0];
+ 'class C { void operator[]=(int i, bool v) => null; }')
+ .executables[0];
expect(executable.kind, UnlinkedExecutableKind.functionOrMethod);
expect(executable.name, '[]=');
expect(executable.hasImplicitReturnType, false);
@@ -2562,6 +2565,18 @@ void set f(value) {}''';
unlinkedSourceUnit: unlinkedUnits[1]);
}
+ test_type_reference_from_part_withPrefix() {
+ addNamedSource('/a.dart', 'class C {}');
Paul Berry 2016/01/11 21:39:54 (Capturing a discussion we just had in person): le
+ addNamedSource('/p.dart', 'part of foo; C v; a.C v2;');
+ serializeLibraryText(
+ 'library foo; import "a.dart"; import "a.dart" as a; part "p.dart";');
+ checkTypeRef(findVariable('v2', variables: unlinkedUnits[1].variables).type,
+ absUri('/a.dart'), 'a.dart', 'C',
+ expectedPrefix: 'a',
+ prelinkedSourceUnit: prelinked.units[1],
+ unlinkedSourceUnit: unlinkedUnits[1]);
+ }
+
test_type_reference_to_class_argument() {
UnlinkedClass cls = serializeClassText('class C<T, U> { T t; U u; }');
{
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698