mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:09:49 +00:00
fix executor_test.dart
Change-Id: Ia90bd8def75589605c1a6d0fc73adfc05201255b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346023 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Auto-Submit: Jake Macdonald <jakemac@google.com> Commit-Queue: Jake Macdonald <jakemac@google.com>
This commit is contained in:
parent
95cad9c8a6
commit
e04801ee0e
|
@ -649,7 +649,7 @@ class LibraryInfo {
|
|||
print('isGetter: false');
|
||||
print('isSetter: false');
|
||||
print('returnType: String');
|
||||
return augment super();
|
||||
return augmented();
|
||||
}'''));
|
||||
});
|
||||
|
||||
|
@ -706,7 +706,7 @@ class LibraryInfo {
|
|||
print('isGetter: true');
|
||||
print('isSetter: false');
|
||||
print('returnType: String');
|
||||
return augment super;
|
||||
return augmented;
|
||||
}'''));
|
||||
});
|
||||
|
||||
|
@ -728,7 +728,7 @@ class LibraryInfo {
|
|||
print('isSetter: true');
|
||||
print('returnType: void');
|
||||
print('positionalParam: String value');
|
||||
return augment super = value;
|
||||
return augmented = value;
|
||||
}'''));
|
||||
});
|
||||
|
||||
|
@ -750,14 +750,14 @@ class LibraryInfo {
|
|||
print('isExternal: false');
|
||||
print('isFinal: true');
|
||||
print('isLate: false');
|
||||
return augment super;
|
||||
return augmented;
|
||||
}'''),
|
||||
equalsIgnoringWhitespace('''
|
||||
augment set _myVariable(/*inferred*/String value) {
|
||||
augment super = value;
|
||||
augmented = value;
|
||||
}'''),
|
||||
equalsIgnoringWhitespace('''
|
||||
augment final /*inferred*/String _myVariable = 'new initial value' + augment super;
|
||||
augment final /*inferred*/String _myVariable = 'new initial value' + augmented;
|
||||
'''),
|
||||
]));
|
||||
});
|
||||
|
@ -830,7 +830,7 @@ class LibraryInfo {
|
|||
print('isSetter: false');
|
||||
print('returnType: MyEnum');
|
||||
print('positionalParam: String myField');
|
||||
return augment super();
|
||||
return augmented();
|
||||
}''')
|
||||
]));
|
||||
});
|
||||
|
@ -964,7 +964,7 @@ augment MyClass.myConstructor(/*inferred*/String myField, ) {
|
|||
print('isSetter: false');
|
||||
print('returnType: MyClass');
|
||||
print('positionalParam: String (inferred) myField');
|
||||
return augment super();
|
||||
return augmented();
|
||||
}''');
|
||||
|
||||
final fieldDefinitionMatchers = [
|
||||
|
@ -975,14 +975,14 @@ final fieldDefinitionMatchers = [
|
|||
print('isExternal: false');
|
||||
print('isFinal: false');
|
||||
print('isLate: false');
|
||||
return augment super;
|
||||
return augmented;
|
||||
}'''),
|
||||
equalsIgnoringWhitespace('''
|
||||
augment set myField(String value) {
|
||||
augment super = value;
|
||||
augmented = value;
|
||||
}'''),
|
||||
equalsIgnoringWhitespace('''
|
||||
augment String myField = \'new initial value\' + augment super;'''),
|
||||
augment String myField = \'new initial value\' + augmented;'''),
|
||||
];
|
||||
|
||||
final methodDefinitionMatchers = [
|
||||
|
@ -993,7 +993,7 @@ final methodDefinitionMatchers = [
|
|||
print('isGetter: false');
|
||||
print('isSetter: false');
|
||||
print('returnType: (String, bool? hello, {String world})');
|
||||
return augment super();
|
||||
return augmented();
|
||||
}'''),
|
||||
equalsIgnoringWhitespace('''
|
||||
augment (String, bool? hello, {String world}) myMethod() {
|
||||
|
@ -1011,7 +1011,7 @@ final methodDefinitionMatchers = [
|
|||
print('field: myField');
|
||||
print('method: myMethod');
|
||||
print('constructor: myConstructor');
|
||||
return augment super();
|
||||
return augmented();
|
||||
}'''),
|
||||
];
|
||||
|
||||
|
@ -1023,7 +1023,7 @@ final mixinMethodDefinitionMatchers = [
|
|||
print('isGetter: false');
|
||||
print('isSetter: false');
|
||||
print('returnType: (String, bool? hello, {String world})');
|
||||
return augment super();
|
||||
return augmented();
|
||||
}'''),
|
||||
equalsIgnoringWhitespace('''
|
||||
augment (String, bool? hello, {String world}) myMixinMethod() {
|
||||
|
@ -1037,6 +1037,6 @@ final mixinMethodDefinitionMatchers = [
|
|||
print('parentClass: MyMixin');
|
||||
print('superClass: null');
|
||||
print('method: myMixinMethod');
|
||||
return augment super();
|
||||
return augmented();
|
||||
}'''),
|
||||
];
|
||||
|
|
|
@ -409,7 +409,7 @@ class SimpleMacro
|
|||
for (var constructor in constructors)
|
||||
"\n print('constructor: ${constructor.identifier.name}');",
|
||||
'''
|
||||
\n return augment super();
|
||||
\n return augmented();
|
||||
}''',
|
||||
]));
|
||||
}
|
||||
|
@ -448,7 +448,7 @@ class SimpleMacro
|
|||
'''print('isExternal: ${variable.hasExternal}');
|
||||
print('isFinal: ${variable.hasFinal}');
|
||||
print('isLate: ${variable.hasLate}');
|
||||
return augment super;
|
||||
return augmented;
|
||||
}''',
|
||||
]),
|
||||
setter: DeclarationCode.fromParts([
|
||||
|
@ -456,10 +456,9 @@ class SimpleMacro
|
|||
variable.identifier.name,
|
||||
'(',
|
||||
variable.type.code,
|
||||
' value) { augment super = value; }'
|
||||
' value) { augmented = value; }'
|
||||
]),
|
||||
initializer:
|
||||
ExpressionCode.fromString("'new initial value' + augment super"),
|
||||
initializer: ExpressionCode.fromString("'new initial value' + augmented"),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -759,7 +758,7 @@ Future<FunctionBodyCode> _buildFunctionAugmentation(
|
|||
if (param.bound != null) param.bound!.code,
|
||||
"');\n",
|
||||
],
|
||||
'return augment super',
|
||||
'return augmented',
|
||||
if (function.isSetter) ...[
|
||||
' = ',
|
||||
function.positionalParameters.first.identifier,
|
||||
|
|
|
@ -501,7 +501,7 @@ class Fixtures {
|
|||
IdentifierImpl(id: RemoteInstance.uniqueId, name: 'myConstructor'),
|
||||
library: Fixtures.library,
|
||||
metadata: [],
|
||||
hasBody: true,
|
||||
hasBody: false, // we will augment with one
|
||||
hasExternal: false,
|
||||
namedParameters: [],
|
||||
positionalParameters: [
|
||||
|
@ -611,7 +611,7 @@ class Fixtures {
|
|||
id: RemoteInstance.uniqueId, name: 'myEnumConstructor'),
|
||||
library: Fixtures.library,
|
||||
metadata: [],
|
||||
hasBody: true,
|
||||
hasBody: false, // We will augment with one
|
||||
hasExternal: false,
|
||||
namedParameters: [],
|
||||
positionalParameters: [
|
||||
|
|
Loading…
Reference in a new issue