@@ -104,13 +104,16 @@ List<AnnotatedTest<T>> getAnnotatedClasses<T>(
104
104
defaultConfigSet = generators.keys.toSet ();
105
105
}
106
106
107
- final annotatedElements =
108
- genAnnotatedElements (libraryReader, defaultConfigSet);
107
+ final annotatedElements = genAnnotatedElements (
108
+ libraryReader,
109
+ defaultConfigSet,
110
+ );
109
111
110
112
final unusedConfigurations = generators.keys.toSet ();
111
113
for (var annotatedElement in annotatedElements) {
112
- unusedConfigurations
113
- .removeAll (annotatedElement.expectation.configurations! );
114
+ unusedConfigurations.removeAll (
115
+ annotatedElement.expectation.configurations! ,
116
+ );
114
117
}
115
118
if (unusedConfigurations.isNotEmpty) {
116
119
if (unusedConfigurations.contains (_defaultConfigurationName)) {
@@ -184,14 +187,18 @@ List<AnnotatedTest<T>> getAnnotatedClasses<T>(
184
187
}
185
188
186
189
if (mapMissingConfigs.isNotEmpty) {
187
- final elements = mapMissingConfigs.entries.toList ()
188
- ..sort ((a, b) => a.key.compareTo (b.key));
189
-
190
- final message = elements.map ((e) {
191
- final sortedConfigs =
192
- (e.value.toList ()..sort ()).map ((v) => '"$v "' ).join (', ' );
193
- return '`${e .key }`: $sortedConfigs ' ;
194
- }).join ('; ' );
190
+ final elements =
191
+ mapMissingConfigs.entries.toList ()
192
+ ..sort ((a, b) => a.key.compareTo (b.key));
193
+
194
+ final message = elements
195
+ .map ((e) {
196
+ final sortedConfigs = (e.value.toList ()..sort ())
197
+ .map ((v) => '"$v "' )
198
+ .join (', ' );
199
+ return '`${e .key }`: $sortedConfigs ' ;
200
+ })
201
+ .join ('; ' );
195
202
196
203
throw ArgumentError (
197
204
'There are elements defined with configurations with no associated '
@@ -288,10 +295,7 @@ class AnnotatedTest<T> {
288
295
File (path).writeAsStringSync (testOutput);
289
296
} else {
290
297
final content = File (path).readAsStringSync ();
291
- expect (
292
- testOutput,
293
- exp.contains ? contains (content) : equals (content),
294
- );
298
+ expect (testOutput, exp.contains ? contains (content) : equals (content));
295
299
}
296
300
} on FileSystemException catch (ex) {
297
301
throw TestFailure (
@@ -331,10 +335,7 @@ class AnnotatedTest<T> {
331
335
final outputDirectory =
332
336
File (p.join (reader.directory, exp.expectedOutputFileName)).parent;
333
337
334
- final path = p.relative (
335
- reader.path,
336
- from: outputDirectory.path,
337
- );
338
+ final path = p.relative (reader.path, from: outputDirectory.path);
338
339
return "part of '$path ';\n\n $output " ;
339
340
}
340
341
@@ -355,8 +356,11 @@ class AnnotatedTest<T> {
355
356
expectedElementName = exp.element as String ;
356
357
}
357
358
// ignore: deprecated_member_use
358
- elementMatcher = const TypeMatcher <Element >()
359
- .having ((e) => e.name, 'name' , expectedElementName);
359
+ elementMatcher = const TypeMatcher <Element >().having (
360
+ (e) => e.name,
361
+ 'name' ,
362
+ expectedElementName,
363
+ );
360
364
} else if (exp.element == true ) {
361
365
elementMatcher = isNotNull;
362
366
} else {
0 commit comments