enable lint prefer_interpolation_to_compose_strings (#83407)
This commit is contained in:
committed by
GitHub
parent
71e711547f
commit
34059eec2c
@@ -146,7 +146,7 @@ mixin LocalComparisonOutput {
|
||||
final Map<String, Image> diffs = result.diffs!.cast<String, Image>();
|
||||
for (final MapEntry<String, Image> entry in diffs.entries) {
|
||||
final File output = getFailureFile(
|
||||
key.isEmpty ? entry.key : entry.key + '_' + key,
|
||||
key.isEmpty ? entry.key : '${entry.key}_$key',
|
||||
golden,
|
||||
basedir,
|
||||
);
|
||||
@@ -161,10 +161,7 @@ mixin LocalComparisonOutput {
|
||||
/// Returns the appropriate file for a given diff from a [ComparisonResult].
|
||||
File getFailureFile(String failure, Uri golden, Uri basedir) {
|
||||
final String fileName = golden.pathSegments.last;
|
||||
final String testName = fileName.split(path.extension(fileName))[0]
|
||||
+ '_'
|
||||
+ failure
|
||||
+ '.png';
|
||||
final String testName = '${fileName.split(path.extension(fileName))[0]}_$failure.png';
|
||||
return File(path.join(
|
||||
path.fromUri(basedir),
|
||||
path.fromUri(Uri.parse('failures/$testName')),
|
||||
|
||||
@@ -85,11 +85,7 @@ abstract class GoldenFileComparator {
|
||||
return key;
|
||||
final String keyString = key.toString();
|
||||
final String extension = path.extension(keyString);
|
||||
return Uri.parse(
|
||||
keyString
|
||||
.split(extension)
|
||||
.join() + '.' + version.toString() + extension
|
||||
);
|
||||
return Uri.parse('${keyString.split(extension).join()}.$version$extension');
|
||||
}
|
||||
|
||||
/// Returns a [ComparisonResult] to describe the pixel differential of the
|
||||
@@ -196,11 +192,7 @@ abstract class WebGoldenComparator {
|
||||
return key;
|
||||
final String keyString = key.toString();
|
||||
final String extension = path.extension(keyString);
|
||||
return Uri.parse(
|
||||
keyString
|
||||
.split(extension)
|
||||
.join() + '.' + version.toString() + extension
|
||||
);
|
||||
return Uri.parse('${keyString.split(extension).join()}.$version$extension');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1926,7 +1926,7 @@ class _DoesNotMatchAccessibilityGuideline extends AsyncMatcher {
|
||||
|
||||
@override
|
||||
Description describe(Description description) {
|
||||
return description.add('Does not ' + guideline.description);
|
||||
return description.add('Does not ${guideline.description}');
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -383,8 +383,8 @@ void main() {
|
||||
testResult.expectedOffsets[valueIndex],
|
||||
offsetMoreOrLessEquals(dragOffsets[valueIndex]),
|
||||
reason:
|
||||
'There is a difference in the expected and actual value of the ' +
|
||||
(valueIndex == 2 ? 'first' : valueIndex == 3 ? 'second' : 'third') +
|
||||
'There is a difference in the expected and actual value of the '
|
||||
'${valueIndex == 2 ? 'first' : valueIndex == 3 ? 'second' : 'third'}'
|
||||
' split offset for the drag with:\n'
|
||||
'Touch slop: ${testResult.slop}\n'
|
||||
'Delta: ${testResult.dragDistance}\n'
|
||||
|
||||
Reference in New Issue
Block a user