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

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

Issue 1395853004: FYI: add strong mode checking to error verifier's task (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: format Created 5 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
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 eb0efbcb5e6005bb8d7b1f1d0ba9c513319f7d72..74bb87442c69bd41ecf24b9a924ae34047ce39d8 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -18,6 +18,7 @@ import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/services/lint.dart';
import 'package:analyzer/src/task/dart.dart';
import 'package:analyzer/src/task/html.dart';
+import 'package:analyzer/src/task/strong/info.dart';
import 'package:analyzer/task/dart.dart';
import 'package:analyzer/task/general.dart';
import 'package:analyzer/task/model.dart';
@@ -4015,8 +4016,15 @@ class C {
computeResult(new LibrarySpecificUnit(source, source), VERIFY_ERRORS);
// validate
_fillErrorListener(VERIFY_ERRORS);
- errorListener.assertErrorsWithCodes(
- <ErrorCode>[StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+
+ // TODO(jmesserly): DDC errors do not hash correctly.
+ // TODO(jmesserly): also we have a duplicate error message here.
+ var errors = errorListener.errors;
+ expect(errors.length, 2);
+ expect(errors[0].errorCode.name, 'dev_compiler.StaticTypeError');
+ expect(errors[0].message,
+ 'Type check failed: topLevel (int) is not of type String');
+ expect(errors[1].errorCode, StaticTypeWarningCode.INVALID_ASSIGNMENT);
}
test_perform_verifyError() {
« no previous file with comments | « pkg/analyzer/lib/src/task/strong/checker.dart ('k') | pkg/analyzer/test/src/task/strong/strong_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698