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

Unified Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 1749423002: fix ResolutionCopier.visitAdjacentStrings (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/generated/parser.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/generated/parser_test.dart
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 710be9b836ef5c5038ab7409b5f95b6b923ec6ed..f18252fcf96539953a92681b02d47c693b4b6811 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -4222,6 +4222,24 @@ class C {
@reflectiveTest
class ResolutionCopierTest extends EngineTestCase {
+ void test_visitAdjacentStrings() {
+ AdjacentStrings createNode() => new AdjacentStrings([
+ new SimpleStringLiteral(null, 'hello'),
+ new SimpleStringLiteral(null, 'world')
+ ]);
+
+ AdjacentStrings fromNode = createNode();
+ DartType propagatedType = ElementFactory.classElement2("A").type;
+ fromNode.propagatedType = propagatedType;
+ DartType staticType = ElementFactory.classElement2("B").type;
+ fromNode.staticType = staticType;
+
+ AdjacentStrings toNode = createNode();
+ ResolutionCopier.copyResolutionData(fromNode, toNode);
+ expect(toNode.propagatedType, same(propagatedType));
+ expect(toNode.staticType, same(staticType));
+ }
+
void test_visitAnnotation() {
String annotationName = "proxy";
Annotation fromNode =
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698