add missing trailing commas in list/set/map literals (#102585)

This commit is contained in:
Alexandre Ardhuin
2022-04-27 09:15:35 +02:00
committed by GitHub
parent 0b80f08cf0
commit 07f1c20474
271 changed files with 1236 additions and 1141 deletions

View File

@@ -10,6 +10,6 @@ void main() {
TestWidgetsFlutterBinding.ensureInitialized(<String, String>{'FLUTTER_TEST': 'false'});
expect(WidgetsBinding.instance, isA<LiveTestWidgetsFlutterBinding>());
}, onPlatform: const <String, dynamic>{
'browser': <Skip>[Skip('Browser will not use the live binding')]
'browser': <Skip>[Skip('Browser will not use the live binding')],
});
}

View File

@@ -12,25 +12,28 @@ import 'package:flutter_test/flutter_test.dart' hide test;
import 'package:flutter_test/flutter_test.dart' as test_package;
// 1x1 transparent pixel
const List<int> _kExpectedPngBytes =
<int>[137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0,
1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137, 0, 0, 0, 11, 73, 68, 65, 84,
120, 1, 99, 97, 0, 2, 0, 0, 25, 0, 5, 144, 240, 54, 245, 0, 0, 0, 0, 73, 69,
78, 68, 174, 66, 96, 130];
const List<int> _kExpectedPngBytes = <int>[
137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0,
1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137, 0, 0, 0, 11, 73, 68, 65, 84,
120, 1, 99, 97, 0, 2, 0, 0, 25, 0, 5, 144, 240, 54, 245, 0, 0, 0, 0, 73, 69,
78, 68, 174, 66, 96, 130,
];
// 1x1 colored pixel
const List<int> _kColorFailurePngBytes =
<int>[137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0,
1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137, 0, 0, 0, 13, 73, 68, 65, 84,
120, 1, 99, 249, 207, 240, 255, 63, 0, 7, 18, 3, 2, 164, 147, 160, 197, 0,
0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130];
const List<int> _kColorFailurePngBytes = <int>[
137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0,
1, 0, 0, 0, 1, 8, 6, 0, 0, 0, 31, 21, 196, 137, 0, 0, 0, 13, 73, 68, 65, 84,
120, 1, 99, 249, 207, 240, 255, 63, 0, 7, 18, 3, 2, 164, 147, 160, 197, 0,
0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130,
];
// 1x2 transparent pixel
const List<int> _kSizeFailurePngBytes =
<int>[137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0,
1, 0, 0,0, 2, 8, 6, 0, 0, 0, 153, 129, 182, 39, 0, 0, 0, 14, 73, 68, 65, 84,
120, 1, 99, 97, 0, 2, 22, 16, 1, 0, 0, 70, 0, 9, 112, 117, 150, 160, 0, 0,
0, 0, 73, 69, 78, 68, 174, 66, 96, 130];
const List<int> _kSizeFailurePngBytes = <int>[
137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0,
1, 0, 0,0, 2, 8, 6, 0, 0, 0, 153, 129, 182, 39, 0, 0, 0, 14, 73, 68, 65, 84,
120, 1, 99, 97, 0, 2, 22, 16, 1, 0, 0, 70, 0, 9, 112, 117, 150, 160, 0, 0,
0, 0, 73, 69, 78, 68, 174, 66, 96, 130,
];
void main() {
late MemoryFileSystem fs;

View File

@@ -129,8 +129,8 @@ void main() {
position: location,
buttons: kSecondaryMouseButton,
pointer: 1,
)
])
),
]),
],
PointerEventRecord(const Duration(milliseconds: 80), <PointerEvent>[
PointerUpEvent(
@@ -138,8 +138,8 @@ void main() {
position: location,
buttons: kSecondaryMouseButton,
pointer: 1,
)
])
),
]),
];
final List<Duration> timeDiffs =
await controller.handlePointerEventRecord(records);

View File

@@ -105,23 +105,31 @@ void main() {
'├─B\n'
'│\n'), isNot(hasAGoodToStringDeep));
expect(_MockToStringDeep.fromLines(
<String>['Paragraph#00000\n',
' │ size: (400x200)\n',
' ╘═╦══ text ═══\n',
' ║ TextSpan:\n',
' ║ "I polished up that handle so carefullee\n',
' ║ That now I am the Ruler of the Queen\'s Navee!"\n',
' ╚═══════════\n']), hasAGoodToStringDeep);
expect(
_MockToStringDeep.fromLines(<String>[
'Paragraph#00000\n',
' │ size: (400x200)\n',
' ╘═╦══ text ═══\n',
' ║ TextSpan:\n',
' ║ "I polished up that handle so carefullee\n',
' ║ That now I am the Ruler of the Queen\'s Navee!"\n',
' ╚═══════════\n',
]),
hasAGoodToStringDeep,
);
// Text span
expect(_MockToStringDeep.fromLines(
<String>['Paragraph#00000\n',
' │ size: (400x200)\n',
' ╘═╦══ text ═══\n',
' ║ TextSpan:\n',
' ║ "I polished up that handle so carefullee\nThat now I am the Ruler of the Queen\'s Navee!"\n',
' ╚═══════════\n']), isNot(hasAGoodToStringDeep));
expect(
_MockToStringDeep.fromLines(<String>[
'Paragraph#00000\n',
' │ size: (400x200)\n',
' ╘═╦══ text ═══\n',
' ║ TextSpan:\n',
' ║ "I polished up that handle so carefullee\nThat now I am the Ruler of the Queen\'s Navee!"\n',
' ╚═══════════\n',
]),
isNot(hasAGoodToStringDeep),
);
});
test('normalizeHashCodesEquals', () {

View File

@@ -526,8 +526,8 @@ void main() {
position: location,
buttons: kSecondaryMouseButton,
pointer: 1,
)
])
),
]),
],
PointerEventRecord(const Duration(milliseconds: 80), <PointerEvent>[
PointerUpEvent(
@@ -535,8 +535,8 @@ void main() {
position: location,
buttons: kSecondaryMouseButton,
pointer: 1,
)
])
),
]),
];
final List<Duration> timeDiffs = await tester.handlePointerEventRecord(records);
expect(timeDiffs.length, records.length);