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

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

Issue 683673004: Fix issue 21379 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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/generated/engine_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/generated/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index f8089e96bc7e48595d2c466dd248f11b05f32e1a..7ed1c5a1d3ecbf742fac4db0671e9a0d68bfc146 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -25,6 +25,7 @@ import 'package:analyzer/src/generated/testing/ast_factory.dart';
import 'package:analyzer/src/generated/testing/element_factory.dart';
import 'package:analyzer/src/generated/java_io.dart';
import '../reflective_tests.dart';
+import 'parser_test.dart';
/**
@@ -977,7 +978,7 @@ class C {
const int ZERO = 0;
class C {
int m(int p) {
- return (p * p) + (p * p) + ZERO;
+ return p + p;
}
}''');
}
@@ -1063,9 +1064,7 @@ class C {
Source source = addSource(oldContent);
LibraryElement library = resolve(source);
CompilationUnit oldUnit = resolveCompilationUnit(source, library);
- AnalysisContext context = analysisContext;
- context.setContents(source, newContent);
- CompilationUnit newUnit = context.parseCompilationUnit(source);
+ CompilationUnit newUnit = ParserTestCase.parseCompilationUnit(newContent, []);
DeclarationMatcher matcher = new DeclarationMatcher();
expect(matcher.matches(newUnit, oldUnit.element), expectMatch);
}
« no previous file with comments | « pkg/analyzer/test/generated/engine_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698