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

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

Issue 2348353002: First steps toward removing MethodTrampoline (Closed)
Patch Set: Created 4 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/test/generated/parser_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/test_support.dart
diff --git a/pkg/analyzer/test/generated/test_support.dart b/pkg/analyzer/test/generated/test_support.dart
index 4242bc5031af92e3033cb847a22b6bc2dbc2e8c1..7b3677041c7f9c8574c4cc768b5152cbf1d8996a 100644
--- a/pkg/analyzer/test/generated/test_support.dart
+++ b/pkg/analyzer/test/generated/test_support.dart
@@ -416,17 +416,16 @@ class GatheringErrorListener implements AnalysisErrorListener {
}
/**
- * Return `true` if the two errors are equivalent.
- *
- * @param firstError the first error being compared
- * @param secondError the second error being compared
- * @return `true` if the two errors are equivalent
+ * Return `true` if the [actualError] matches the [expectedError].
*/
- bool _equalErrors(AnalysisError firstError, AnalysisError secondError) =>
- identical(firstError.errorCode, secondError.errorCode) &&
- firstError.offset == secondError.offset &&
- firstError.length == secondError.length &&
- _equalSources(firstError.source, secondError.source);
+ bool _equalErrors(AnalysisError expectedError, AnalysisError actualError) {
+ Source expectedSource = expectedError.source;
+ return identical(expectedError.errorCode, actualError.errorCode) &&
+ expectedError.offset == actualError.offset &&
+ expectedError.length == actualError.length &&
+ (expectedSource == null ||
+ _equalSources(expectedSource, actualError.source));
+ }
/**
* Return `true` if the two sources are equivalent.
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698