-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Quick background / example: I would like to move ResolveNameInScopeTest from the analyzer package to the linter package. But it depends on AbstractLinterContextTest (also in pkg/analyzer/test) which depends on PubPackageResolutionTest (also in pkg/analyzer/test). So I cannot move any tests until we have some shared base classes. Or I can copy swaths of code.
Creating shared testing code between the analyzer package, linter package, analysis_server and analysis_server_plugin packages is necessary for the plugins story. CC @bwilkerson @scheglov @pq
ContextResolutionTest
It would take significant investigation to determine how many test utility classes and mixins would be prudent to move. But as a starting place, I think it would be of huge benefit to move ContextResolutionTest into package:analyzer_utilities. How do we get there?
ResourceProviderMixin
ResourceProviderMixin (mixed into ContextResolutionTest) is declared in package:analyzer/src/test_utilities, so we're already in a good place there. Should be easier to move than other things, as it cannot depend on code in pkg/analyzer/test. This might be the best starting place.
ResolutionTest
ContextResolutionTest also mixes in ResolutionTest, so this is also a pre-requirement. Unfortunately it lives in pkg/analyzer/test, and is in a file which imports eight other files from pkg/analyzer/test. Yikes.
PubPackageResolutionTest
PubPackageResolutionTest is also an important base class, as it is the base for supporting analysis options files and package configs.