@@ -42,9 +42,19 @@ Future<void> testExecutable(FutureOr<void> Function() testMain, {String? namePre
42
42
const Platform platform = LocalPlatform ();
43
43
const FileSystem fs = LocalFileSystem ();
44
44
if (FlutterPostSubmitFileComparator .isForEnvironment (platform)) {
45
- goldenFileComparator = await FlutterPostSubmitFileComparator .fromDefaultComparator (platform, namePrefix: namePrefix, log: print, fs: fs);
45
+ goldenFileComparator = await FlutterPostSubmitFileComparator .fromDefaultComparator (
46
+ platform,
47
+ namePrefix: namePrefix,
48
+ log: print,
49
+ fs: fs,
50
+ );
46
51
} else if (FlutterPreSubmitFileComparator .isForEnvironment (platform)) {
47
- goldenFileComparator = await FlutterPreSubmitFileComparator .fromDefaultComparator (platform, namePrefix: namePrefix, log: print, fs: fs);
52
+ goldenFileComparator = await FlutterPreSubmitFileComparator .fromDefaultComparator (
53
+ platform,
54
+ namePrefix: namePrefix,
55
+ log: print,
56
+ fs: fs,
57
+ );
48
58
} else if (FlutterSkippingFileComparator .isForEnvironment (platform)) {
49
59
goldenFileComparator = FlutterSkippingFileComparator .fromDefaultComparator (
50
60
'Golden file testing is not executed on Cirrus, or LUCI environments '
@@ -55,7 +65,11 @@ Future<void> testExecutable(FutureOr<void> Function() testMain, {String? namePre
55
65
fs: fs,
56
66
);
57
67
} else {
58
- goldenFileComparator = await FlutterLocalFileComparator .fromDefaultComparator (platform, log: print, fs: fs);
68
+ goldenFileComparator = await FlutterLocalFileComparator .fromDefaultComparator (
69
+ platform,
70
+ log: print,
71
+ fs: fs,
72
+ );
59
73
}
60
74
await testMain ();
61
75
}
@@ -251,7 +265,6 @@ class FlutterPostSubmitFileComparator extends FlutterGoldenFileComparator {
251
265
required LogCallback log,
252
266
required FileSystem fs,
253
267
}) async {
254
-
255
268
defaultComparator ?? = goldenFileComparator as LocalFileComparator ;
256
269
final Directory baseDirectory = FlutterGoldenFileComparator .getBaseDirectory (
257
270
defaultComparator,
@@ -263,7 +276,13 @@ class FlutterPostSubmitFileComparator extends FlutterGoldenFileComparator {
263
276
264
277
goldens ?? = SkiaGoldClient (baseDirectory, log: log);
265
278
await goldens.auth ();
266
- return FlutterPostSubmitFileComparator (baseDirectory.uri, goldens, namePrefix: namePrefix, log: log, fs: fs);
279
+ return FlutterPostSubmitFileComparator (
280
+ baseDirectory.uri,
281
+ goldens,
282
+ namePrefix: namePrefix,
283
+ log: log,
284
+ fs: fs,
285
+ );
267
286
}
268
287
269
288
@override
@@ -272,7 +291,6 @@ class FlutterPostSubmitFileComparator extends FlutterGoldenFileComparator {
272
291
golden = _addPrefix (golden);
273
292
await update (golden, imageBytes);
274
293
final File goldenFile = getGoldenFile (golden);
275
-
276
294
return skiaClient.imgtestAdd (golden.path, goldenFile);
277
295
}
278
296
@@ -285,7 +303,6 @@ class FlutterPostSubmitFileComparator extends FlutterGoldenFileComparator {
285
303
&& ! platform.environment.containsKey ('GOLD_TRYJOB' )
286
304
// Only run on main branch.
287
305
&& _isMainBranch (platform.environment['GIT_BRANCH' ]);
288
-
289
306
return luciPostSubmit;
290
307
}
291
308
}
@@ -333,7 +350,6 @@ class FlutterPreSubmitFileComparator extends FlutterGoldenFileComparator {
333
350
required LogCallback log,
334
351
required FileSystem fs,
335
352
}) async {
336
-
337
353
defaultComparator ?? = goldenFileComparator as LocalFileComparator ;
338
354
final Directory baseDirectory = testBasedir ?? FlutterGoldenFileComparator .getBaseDirectory (
339
355
defaultComparator,
@@ -427,7 +443,14 @@ class FlutterSkippingFileComparator extends FlutterGoldenFileComparator {
427
443
defaultComparator ?? = goldenFileComparator as LocalFileComparator ;
428
444
final Uri basedir = defaultComparator.basedir;
429
445
final SkiaGoldClient skiaClient = SkiaGoldClient (fs.directory (basedir), log: log);
430
- return FlutterSkippingFileComparator (basedir, skiaClient, reason, namePrefix: namePrefix, log: log, fs: fs);
446
+ return FlutterSkippingFileComparator (
447
+ basedir,
448
+ skiaClient,
449
+ reason,
450
+ namePrefix: namePrefix,
451
+ log: log,
452
+ fs: fs,
453
+ );
431
454
}
432
455
433
456
@override
@@ -549,7 +572,12 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
549
572
);
550
573
}
551
574
552
- return FlutterLocalFileComparator (baseDirectory.uri, goldens, log: log, fs: fs);
575
+ return FlutterLocalFileComparator (
576
+ baseDirectory.uri,
577
+ goldens,
578
+ log: log,
579
+ fs: fs,
580
+ );
553
581
}
554
582
555
583
@override
0 commit comments