fix missing spaces in adjacent strings (#49159)
This commit is contained in:
committed by
Flutter GitHub Bot
parent
def2205ee4
commit
3800bb7b10
@@ -195,16 +195,17 @@ class TestAsyncUtils {
|
||||
final _StackEntry originalGuarder = _findResponsibleMethod(scope.creationStack, 'guard', information);
|
||||
final _StackEntry collidingGuarder = _findResponsibleMethod(StackTrace.current, 'guardSync', information);
|
||||
if (originalGuarder != null && collidingGuarder != null) {
|
||||
final String originalKind = originalGuarder.className == null ? 'function' : 'method';
|
||||
String originalName;
|
||||
if (originalGuarder.className == null) {
|
||||
originalName = '(${originalGuarder.methodName}) ';
|
||||
originalName = '$originalKind (${originalGuarder.methodName})';
|
||||
information.add(ErrorDescription(
|
||||
'The guarded "${originalGuarder.methodName}" function '
|
||||
'was called from ${originalGuarder.callerFile} '
|
||||
'on line ${originalGuarder.callerLine}.'
|
||||
));
|
||||
} else {
|
||||
originalName = '(${originalGuarder.className}.${originalGuarder.methodName}) ';
|
||||
originalName = '$originalKind (${originalGuarder.className}.${originalGuarder.methodName})';
|
||||
information.add(ErrorDescription(
|
||||
'The guarded method "${originalGuarder.methodName}" '
|
||||
'from class ${originalGuarder.className} '
|
||||
@@ -215,25 +216,26 @@ class TestAsyncUtils {
|
||||
final String again = (originalGuarder.callerFile == collidingGuarder.callerFile) &&
|
||||
(originalGuarder.callerLine == collidingGuarder.callerLine) ?
|
||||
'again ' : '';
|
||||
final String collidingKind = collidingGuarder.className == null ? 'function' : 'method';
|
||||
String collidingName;
|
||||
if ((originalGuarder.className == collidingGuarder.className) &&
|
||||
(originalGuarder.methodName == collidingGuarder.methodName)) {
|
||||
originalName = '';
|
||||
collidingName = '';
|
||||
originalName = originalKind;
|
||||
collidingName = collidingKind;
|
||||
information.add(ErrorDescription(
|
||||
'Then, it '
|
||||
'was called ${again}from ${collidingGuarder.callerFile} '
|
||||
'on line ${collidingGuarder.callerLine}.'
|
||||
));
|
||||
} else if (collidingGuarder.className == null) {
|
||||
collidingName = '(${collidingGuarder.methodName}) ';
|
||||
collidingName = '$collidingKind (${collidingGuarder.methodName})';
|
||||
information.add(ErrorDescription(
|
||||
'Then, the "${collidingGuarder.methodName}" function '
|
||||
'was called ${again}from ${collidingGuarder.callerFile} '
|
||||
'on line ${collidingGuarder.callerLine}.'
|
||||
));
|
||||
} else {
|
||||
collidingName = '(${collidingGuarder.className}.${collidingGuarder.methodName}) ';
|
||||
collidingName = '$collidingKind (${collidingGuarder.className}.${collidingGuarder.methodName})';
|
||||
information.add(ErrorDescription(
|
||||
'Then, the "${collidingGuarder.methodName}" method '
|
||||
'${originalGuarder.className == collidingGuarder.className ? "(also from class ${collidingGuarder.className})"
|
||||
@@ -243,9 +245,9 @@ class TestAsyncUtils {
|
||||
));
|
||||
}
|
||||
information.add(ErrorDescription(
|
||||
'The first ${originalGuarder.className == null ? "function" : "method"} $originalName'
|
||||
'The first $originalName '
|
||||
'had not yet finished executing at the time that '
|
||||
'the second ${collidingGuarder.className == null ? "function" : "method"} $collidingName'
|
||||
'the second $collidingName '
|
||||
'was called. Since both are guarded, and the second was not a nested call inside the first, the '
|
||||
'first must complete its execution before the second can be called. Typically, this is achieved by '
|
||||
'putting an "await" statement in front of the call to the first.'
|
||||
@@ -259,9 +261,7 @@ class TestAsyncUtils {
|
||||
));
|
||||
}
|
||||
information.add(DiagnosticsStackTrace(
|
||||
'\nWhen the first ${originalGuarder.className == null ? "function" : "method"} '
|
||||
'$originalName'
|
||||
'was called, this was the stack',
|
||||
'\nWhen the first $originalName was called, this was the stack',
|
||||
scope.creationStack,
|
||||
));
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class TestDragData {
|
||||
|
||||
void main() {
|
||||
testWidgets(
|
||||
'WidgetTester.drag must break the offset into multiple parallel components if'
|
||||
'WidgetTester.drag must break the offset into multiple parallel components if '
|
||||
'the drag goes outside the touch slop values',
|
||||
(WidgetTester tester) async {
|
||||
// This test checks to make sure that the total drag will be correctly split into
|
||||
|
||||
Reference in New Issue
Block a user