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

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

Issue 221483002: Fix for translation of \!= to \!identical(), but use == and \!= for Enum. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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/scanner_test.dart ('k') | pkg/code_transformers/test/resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/test_support.dart
diff --git a/pkg/analyzer/test/generated/test_support.dart b/pkg/analyzer/test/generated/test_support.dart
index 9bffa5a45732039ba5910be23d6dcca9e6012787..2490233aca98c428bfd85c9ca633f3e0e37aa929 100644
--- a/pkg/analyzer/test/generated/test_support.dart
+++ b/pkg/analyzer/test/generated/test_support.dart
@@ -26,7 +26,7 @@ class GatheringErrorListener implements AnalysisErrorListener {
/**
* The source being parsed.
*/
- String _rawSource;
+ final String _rawSource;
/**
* The source being parsed after inserting a marker at the beginning and end of the range of the
@@ -52,14 +52,13 @@ class GatheringErrorListener implements AnalysisErrorListener {
/**
* Initialize a newly created error listener to collect errors.
*/
- GatheringErrorListener() : super();
+ GatheringErrorListener() : this.con1(null);
/**
* Initialize a newly created error listener to collect errors.
*/
- GatheringErrorListener.con1(String rawSource) {
- this._rawSource = rawSource;
- this._markedSource = rawSource;
+ GatheringErrorListener.con1(this._rawSource) {
+ this._markedSource = _rawSource;
}
/**
@@ -210,7 +209,7 @@ class GatheringErrorListener implements AnalysisErrorListener {
int expectedErrorCount = 0;
int expectedWarningCount = 0;
for (ErrorSeverity severity in expectedSeverities) {
- if (identical(severity, ErrorSeverity.ERROR)) {
+ if (severity == ErrorSeverity.ERROR) {
expectedErrorCount++;
} else {
expectedWarningCount++;
@@ -219,7 +218,7 @@ class GatheringErrorListener implements AnalysisErrorListener {
int actualErrorCount = 0;
int actualWarningCount = 0;
for (AnalysisError error in _errors) {
- if (identical(error.errorCode.errorSeverity, ErrorSeverity.ERROR)) {
+ if (error.errorCode.errorSeverity == ErrorSeverity.ERROR) {
actualErrorCount++;
} else {
actualWarningCount++;
« no previous file with comments | « pkg/analyzer/test/generated/scanner_test.dart ('k') | pkg/code_transformers/test/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698