Files
sdk/pkg/analyzer/test/source
Konstantin Shcheglov 5d17e0aa92 CQ. Stop using mocks of Source in analyzer/.
Use FileSource backed by analyzer_testing resources instead of the
test-only Source implementations in analyzer tests.

Update the lightweight TestAnalysisContext to receive a
ResourceProviderMixin and install a URI resolver that produces real
FileSource instances for the dart: and package: URIs used by mock SDK
elements. Convert scanner, diagnostic, options, constant, type system,
and workspace tests to create sources from in-memory files.

Remove the remaining Source mock helpers, including TestSource,
TestSourceWithUri, local Source mocks, and the unused TestTypeProvider.
This keeps test sources closer to production Source behavior and avoids
partial mock implementations that rely on noSuchMethod stubs.

Change-Id: Iad600fb7f5ea00d2c015191df548e0d66a424940
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/499422
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2026-04-30 12:39:38 -07:00
..