CQ. Remove assertErrorsInList().

Change-Id: I51afa9bce21992d6093935d303034551e135c94d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510500
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This commit is contained in:
Konstantin Shcheglov
2026-06-10 11:25:01 -07:00
parent 95b017937c
commit cb41c7b055
2 changed files with 2 additions and 12 deletions
@@ -28,7 +28,6 @@ import 'package:analyzer_testing/src/expected_diagnostics.dart';
import 'package:analyzer_utilities/testing/tree_string_sink.dart';
import 'package:test/test.dart';
import '../../../generated/test_support.dart';
import '../../../util/diff.dart';
import '../../../util/element_printer.dart';
import '../../summary/resolved_ast_printer.dart';
@@ -119,16 +118,6 @@ mixin ResolutionTest implements ResourceProviderMixin {
}
}
void assertErrorsInList(
List<Diagnostic> diagnostics,
List<ExpectedDiagnostic> expectedDiagnostics,
) {
GatheringDiagnosticListener diagnosticListener =
GatheringDiagnosticListener();
diagnosticListener.addAll(diagnostics);
diagnosticListener.assertErrors(expectedDiagnostics);
}
void assertHasTestErrors(TestResolvedUnitResult result) {
expect(result.diagnostics, isNotEmpty);
}
@@ -4,6 +4,7 @@
import 'package:analyzer/dart/analysis/results.dart';
import 'package:analyzer/error/error.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
import '../dart/resolution/context_collection_resolution.dart';
@@ -51,7 +52,7 @@ class MockSdkTest extends PubPackageResolutionTest {
element.diagnosticCode.type != DiagnosticType.STATIC_WARNING,
)
.toList();
assertErrorsInList(notHints, []);
expect(notHints, isEmpty);
}
Future<ResolvedLibraryResult> _resolvedLibraryByUri(String uriStr) async {