add missing trailing commas in list/set/map literals (#102585)
This commit is contained in:
committed by
GitHub
parent
0b80f08cf0
commit
07f1c20474
@@ -722,7 +722,7 @@ abstract class WidgetController {
|
||||
delta: offsets[t+1] - offsets[t],
|
||||
pointer: pointer,
|
||||
buttons: buttons,
|
||||
)
|
||||
),
|
||||
]),
|
||||
],
|
||||
PointerEventRecord(duration, <PointerEvent>[
|
||||
@@ -734,7 +734,7 @@ abstract class WidgetController {
|
||||
// change = PointerChange.up, which translates to PointerUpEvent,
|
||||
// doesn't provide the button field.
|
||||
// buttons: buttons,
|
||||
)
|
||||
),
|
||||
]),
|
||||
];
|
||||
return TestAsyncUtils.guard<void>(() async {
|
||||
|
||||
@@ -604,7 +604,7 @@ Matcher matchesSemantics({
|
||||
if (hasToggledState) SemanticsFlag.hasToggledState,
|
||||
if (isToggled) SemanticsFlag.isToggled,
|
||||
if (hasImplicitScrolling) SemanticsFlag.hasImplicitScrolling,
|
||||
if (isSlider) SemanticsFlag.isSlider
|
||||
if (isSlider) SemanticsFlag.isSlider,
|
||||
];
|
||||
|
||||
final List<SemanticsAction> actions = <SemanticsAction>[
|
||||
|
||||
@@ -274,7 +274,7 @@ class TestAsyncUtils {
|
||||
if (_scopeStack.isNotEmpty) {
|
||||
final List<DiagnosticsNode> information = <DiagnosticsNode>[
|
||||
ErrorSummary('Asynchronous call to guarded function leaked.'),
|
||||
ErrorHint('You must use "await" with all Future-returning test APIs.')
|
||||
ErrorHint('You must use "await" with all Future-returning test APIs.'),
|
||||
];
|
||||
for (final _AsyncScope scope in _scopeStack) {
|
||||
final _StackEntry? guarder = _findResponsibleMethod(scope.creationStack, 'guard', information);
|
||||
|
||||
@@ -977,7 +977,7 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker
|
||||
'should be disposed by calling dispose() on the AnimationController itself. '
|
||||
'Otherwise, the ticker will leak.'
|
||||
),
|
||||
ticker.describeForError('The offending ticker was')
|
||||
ticker.describeForError('The offending ticker was'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -1002,7 +1002,7 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker
|
||||
'If your test uses SemanticsTester, it is '
|
||||
'sufficient to call dispose() on SemanticsTester. Otherwise, the '
|
||||
'existing handle will leak into another test and alter its behavior.'
|
||||
)
|
||||
),
|
||||
]);
|
||||
}
|
||||
_lastRecordedSemanticsHandles = null;
|
||||
|
||||
@@ -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')],
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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', () {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user