Files
sdk/pkg/analyzer_testing
Konstantin Shcheglov 5252e5e3d3 CQ. Remove assertErrorsInFile2(), use resolveFilesWithDiagnostics().
Add helpers that resolve non-test files using the same inline diagnostic
expectation format as resolveTestCodeWithDiagnostics.
resolveFileWithDiagnostics handles a single file, while
resolveFilesWithDiagnostics writes all related files before resolving
any of them.

Add multi-file diagnostic expectation generation so context messages in
one file can be referenced from diagnostics reported in another. Teach
expectation updating how to target values in a files-to-code map using
per-entry intra-invocation ids.

Remove assertErrorsInFile2 and migrate diagnostics tests from
hand-written ExpectedError offsets to inline markers. This keeps the
diagnostic range, code, message, and cross-file context next to the code
under test, and makes expectation updates reusable for library and part
tests.

Initialize strong-mode type assertions from resolveFile so callers that
resolve files other than testFile get the same setup.

Change-Id: Ie492155b046c28a535faf21fa9a2e47797caffb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506180
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2026-05-27 14:05:36 -07:00
..
2025-05-02 06:58:49 -07:00

This package provides testing utilities related to the analyzer and analysis_server_plugin packages.

Support

Post issues and feature requests at https://github.com/dart-lang/sdk/issues. These will be triaged according to the analyzer triage priorities.

Questions and discussions are welcome at the #hackers-analyzer Discord channel.

License

See the LICENSE file.