testAnnotatedElements<T> function
void
testAnnotatedElements<T>(})
If defaultConfiguration
is not provided or null
, "default" and the keys
from additionalGenerators
(if provided) are used.
Tests registered by this function assume initializeBuildLogTracking has been called.
If expectedAnnotatedTests
is provided, it should contain the names of the
members in libraryReader
that are annotated for testing. If the same
element is annotated for multiple tests, it should appear in the list
the same number of times.
Implementation
void testAnnotatedElements<T>(
LibraryReader libraryReader,
GeneratorForAnnotation<T> defaultGenerator, {
Map<String, GeneratorForAnnotation<T>>? additionalGenerators,
Iterable<String>? expectedAnnotatedTests,
Iterable<String>? defaultConfiguration,
}) {
for (var entry in getAnnotatedClasses<T>(
libraryReader,
defaultGenerator,
additionalGenerators: additionalGenerators,
expectedAnnotatedTests: expectedAnnotatedTests,
defaultConfiguration: defaultConfiguration,
)) {
entry._registerTest();
}
}