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

Unified Diff: pkg/analyzer/test/src/task/dart_test.dart

Issue 1305863011: Improve strong-mode implementation and fix several failing tests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Addressed comments Created 5 years, 3 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/strong_mode.dart ('k') | pkg/analyzer/test/src/task/strong_mode_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/dart_test.dart
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index 95a9ff5c2176bc97752272923d0b518056708e83..f4fe1211e320d9b7eee88867d10b8472ba2a2c5d 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -2269,8 +2269,7 @@ class C {
computeResult(target, RESOLVED_UNIT5,
matcher: isPartiallyResolveUnitReferencesTask);
// Test the outputs
- expect(outputs[CLASSES_IN_UNIT], hasLength(2));
- expect(outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT], hasLength(2));
+ expect(outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT], hasLength(4));
CompilationUnit unit = outputs[RESOLVED_UNIT5];
expect(unit, same(outputs[RESOLVED_UNIT5]));
// Test the state of the AST
@@ -2280,8 +2279,7 @@ class C {
expect(initializer.staticElement, isNotNull);
// Test the error generation
_fillErrorListener(PARTIALLY_RESOLVE_REFERENCES_ERRORS);
- errorListener.assertErrorsWithCodes(
- <ErrorCode>[StaticWarningCode.UNDEFINED_IDENTIFIER]);
+ errorListener.assertNoErrors();
}
test_perform_importExport() {
@@ -2311,20 +2309,18 @@ main() {
computeResult(new LibrarySpecificUnit(sourceC, sourceC), RESOLVED_UNIT5,
matcher: isPartiallyResolveUnitReferencesTask);
// validate
- expect(outputs[CLASSES_IN_UNIT], hasLength(0));
expect(outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT], hasLength(0));
CompilationUnit unit = outputs[RESOLVED_UNIT5];
expect(unit, isNotNull);
- FunctionDeclaration functionDeclaration = unit.declarations[0];
- BlockFunctionBody body = functionDeclaration.functionExpression.body;
+ FunctionDeclaration mainFunction = unit.declarations[0];
+ expect(mainFunction.element, isNotNull);
+ BlockFunctionBody body = mainFunction.functionExpression.body;
List<Statement> statements = body.block.statements;
ExpressionStatement statement = statements[0];
MethodInvocation invocation = statement.expression;
MethodElement methodElement = invocation.methodName.staticElement;
- expect(methodElement, isNotNull);
- expect(methodElement.type, isNotNull);
- expect(methodElement.returnType.toString(), 'int');
+ expect(methodElement, isNull);
}
}
« no previous file with comments | « pkg/analyzer/lib/src/task/strong_mode.dart ('k') | pkg/analyzer/test/src/task/strong_mode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698