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

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

Issue 1183723002: Explicitly compute library errors in tests. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/task/dart.dart ('k') | pkg/analyzer/test/generated/compile_time_error_code_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/all_the_rest_test.dart
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index 858853607f12947be8e8074b7b920b5ee36e862e..a928617a39238b43ac6d762ca55b7f0ddf7b1796 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -878,7 +878,7 @@ class ConstantEvaluatorTest extends ResolverTestCase {
EvaluationResult _getExpressionValue(String contents) {
Source source = addSource("var x = $contents;");
- LibraryElement library = resolve(source);
+ LibraryElement library = resolve2(source);
CompilationUnit unit =
analysisContext.resolveCompilationUnit(source, library);
expect(unit, isNotNull);
@@ -1266,7 +1266,7 @@ class C {
const int a = c;
const int b = a;
const int c = b;''');
- LibraryElement libraryElement = resolve(librarySource);
+ LibraryElement libraryElement = resolve2(librarySource);
CompilationUnit unit =
analysisContext.resolveCompilationUnit(librarySource, libraryElement);
analysisContext.computeErrors(librarySource);
@@ -1285,7 +1285,7 @@ const int c = b;''');
Source librarySource = addSource(r'''
const int b = a;
const int a = 0;''');
- LibraryElement libraryElement = resolve(librarySource);
+ LibraryElement libraryElement = resolve2(librarySource);
CompilationUnit unit =
analysisContext.resolveCompilationUnit(librarySource, libraryElement);
expect(unit, isNotNull);
@@ -1313,7 +1313,7 @@ const int a = 0;''');
part of lib;
const int b = a;
const int d = c;''');
- LibraryElement libraryElement = resolve(librarySource);
+ LibraryElement libraryElement = resolve2(librarySource);
CompilationUnit libraryUnit =
analysisContext.resolveCompilationUnit(librarySource, libraryElement);
expect(libraryUnit, isNotNull);
@@ -1338,7 +1338,7 @@ const int d = c;''');
void test_computeValues_singleVariable() {
Source librarySource = addSource("const int a = 0;");
- LibraryElement libraryElement = resolve(librarySource);
+ LibraryElement libraryElement = resolve2(librarySource);
CompilationUnit unit =
analysisContext.resolveCompilationUnit(librarySource, libraryElement);
expect(unit, isNotNull);
@@ -1355,7 +1355,7 @@ const int d = c;''');
enum E { id0, id1 }
const E e = E.id0;
''');
- LibraryElement libraryElement = resolve(librarySource);
+ LibraryElement libraryElement = resolve2(librarySource);
CompilationUnit unit =
analysisContext.resolveCompilationUnit(librarySource, libraryElement);
expect(unit, isNotNull);
@@ -2171,7 +2171,7 @@ const A a = const A();
void _assertProperDependencies(String sourceText,
[List<ErrorCode> expectedErrorCodes = ErrorCode.EMPTY_LIST]) {
Source source = addSource(sourceText);
- LibraryElement element = resolve(source);
+ LibraryElement element = resolve2(source);
CompilationUnit unit =
analysisContext.resolveCompilationUnit(source, element);
expect(unit, isNotNull);
@@ -6593,7 +6593,7 @@ core.int value;''');
*/
CompilationUnit _resolveContents(String code) {
Source source = addSource(code);
- LibraryElement library = resolve(source);
+ LibraryElement library = resolve2(source);
assertNoErrors(source);
verify([source]);
return analysisContext.resolveCompilationUnit(source, library);
@@ -7332,7 +7332,7 @@ String f(E e) {
return x;
}
''');
- LibraryElement element = resolve(source);
+ LibraryElement element = resolve2(source);
CompilationUnit unit = resolveCompilationUnit(source, element);
FunctionDeclaration function = unit.declarations.last;
BlockFunctionBody body = function.functionExpression.body;
@@ -7354,7 +7354,7 @@ String f(E e) {
return x;
}
''');
- LibraryElement element = resolve(source);
+ LibraryElement element = resolve2(source);
CompilationUnit unit = resolveCompilationUnit(source, element);
FunctionDeclaration function = unit.declarations.last;
BlockFunctionBody body = function.functionExpression.body;
@@ -7374,7 +7374,7 @@ String f(E e) {
}
}
''');
- LibraryElement element = resolve(source);
+ LibraryElement element = resolve2(source);
CompilationUnit unit = resolveCompilationUnit(source, element);
FunctionDeclaration function = unit.declarations.last;
BlockFunctionBody body = function.functionExpression.body;
@@ -7394,7 +7394,7 @@ String f(E e) {
}
}
''');
- LibraryElement element = resolve(source);
+ LibraryElement element = resolve2(source);
CompilationUnit unit = resolveCompilationUnit(source, element);
FunctionDeclaration function = unit.declarations.last;
BlockFunctionBody body = function.functionExpression.body;
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/test/generated/compile_time_error_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698