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. |