| Index: pkg/analysis_server/test/services/correction/assist_test.dart
|
| diff --git a/pkg/analysis_server/test/services/correction/assist_test.dart b/pkg/analysis_server/test/services/correction/assist_test.dart
|
| index 13d40c2722e5d3da3bf4eddea4438e3bd30dd163..d7323a2d2f98e153b01f304c8c82e479779d6ada 100644
|
| --- a/pkg/analysis_server/test/services/correction/assist_test.dart
|
| +++ b/pkg/analysis_server/test/services/correction/assist_test.dart
|
| @@ -132,7 +132,7 @@ class A {}
|
| class _B extends A {}
|
| foo(f(_B p)) {}
|
| ''');
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'my_lib.dart';
|
| main() {
|
| foo((test) {});
|
| @@ -150,7 +150,7 @@ class A {}
|
| class _B extends A {}
|
| List<_B> getValues() => [];
|
| ''');
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'my_lib.dart';
|
| class A<T> {
|
| main() {
|
| @@ -171,7 +171,7 @@ class A {}
|
| class _B extends A {}
|
| List<_B> getValues() => [];
|
| ''');
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'my_lib.dart';
|
| main() {
|
| var v = getValues();
|
| @@ -189,7 +189,7 @@ class A {}
|
| class _B extends A {}
|
| _B getValue() => new _B();
|
| ''');
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'my_lib.dart';
|
| main() {
|
| var v = getValue();
|
| @@ -199,7 +199,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_classField_OK_final() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| final f = 0;
|
| }
|
| @@ -215,7 +215,7 @@ class A {
|
| }
|
|
|
| test_addTypeAnnotation_classField_OK_int() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| var f = 0;
|
| }
|
| @@ -231,7 +231,7 @@ class A {
|
| }
|
|
|
| test_addTypeAnnotation_declaredIdentifier_BAD_hasTypeAnnotation() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| for (String item in items) {
|
| }
|
| @@ -241,7 +241,7 @@ main(List<String> items) {
|
| }
|
|
|
| test_addTypeAnnotation_declaredIdentifier_BAD_inForEachBody() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| for (var item in items) {
|
| 42;
|
| @@ -253,7 +253,7 @@ main(List<String> items) {
|
|
|
| test_addTypeAnnotation_declaredIdentifier_BAD_unknownType() async {
|
| verifyNoTestUnitErrors = false;
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| for (var item in unknownList) {
|
| }
|
| @@ -263,7 +263,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_declaredIdentifier_generic_OK() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A<T> {
|
| main(List<List<T>> items) {
|
| for (var item in items) {
|
| @@ -285,7 +285,7 @@ class A<T> {
|
| }
|
|
|
| test_addTypeAnnotation_declaredIdentifier_OK() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| for (var item in items) {
|
| }
|
| @@ -320,7 +320,7 @@ main(List<String> items) {
|
| import 'dart:async';
|
| List<Future<int>> getFutures() => null;
|
| ''');
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'my_lib.dart';
|
| main() {
|
| for (var future in getFutures()) {
|
| @@ -341,7 +341,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_declaredIdentifier_OK_final() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| for (final item in items) {
|
| }
|
| @@ -359,7 +359,7 @@ main(List<String> items) {
|
| }
|
|
|
| test_addTypeAnnotation_local_BAD_hasTypeAnnotation() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| int v = 42;
|
| }
|
| @@ -368,7 +368,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_local_BAD_multiple() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var a = 1, b = '';
|
| }
|
| @@ -378,7 +378,7 @@ main() {
|
|
|
| test_addTypeAnnotation_local_BAD_noValue() async {
|
| verifyNoTestUnitErrors = false;
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| }
|
| @@ -387,7 +387,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_local_BAD_null() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = null;
|
| }
|
| @@ -396,7 +396,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_local_BAD_onInitializer() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var abc = 0;
|
| }
|
| @@ -406,7 +406,7 @@ main() {
|
|
|
| test_addTypeAnnotation_local_BAD_unknown() async {
|
| verifyNoTestUnitErrors = false;
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = unknownVar;
|
| }
|
| @@ -415,7 +415,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_local_generic_OK_literal() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| main(List<int> items) {
|
| var v = items;
|
| @@ -435,7 +435,7 @@ class A {
|
| }
|
|
|
| test_addTypeAnnotation_local_generic_OK_local() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A<T> {
|
| main(List<T> items) {
|
| var v = items;
|
| @@ -461,7 +461,7 @@ class A<T> {
|
| import 'dart:async';
|
| Future<int> getFutureInt() => null;
|
| ''');
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'my_lib.dart';
|
| main() {
|
| var v = getFutureInt();
|
| @@ -551,7 +551,7 @@ class MyClass {}
|
| import '../aa/bbb/lib_a.dart';
|
| MyClass newMyClass() => null;
|
| ''');
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'ccc/lib_b.dart';
|
| main() {
|
| var v = newMyClass();
|
| @@ -570,7 +570,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_local_OK_Function() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = () => 1;
|
| }
|
| @@ -586,7 +586,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_local_OK_int() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = 0;
|
| }
|
| @@ -602,7 +602,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_local_OK_List() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = <String>[];
|
| }
|
| @@ -618,7 +618,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_local_OK_localType() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class C {}
|
| C f() => null;
|
| main() {
|
| @@ -638,7 +638,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_local_OK_onName() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var abc = 0;
|
| }
|
| @@ -654,7 +654,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_local_OK_onVar() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = 0;
|
| }
|
| @@ -670,7 +670,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_OK_privateType_sameLibrary() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class _A {}
|
| _A getValue() => new _A();
|
| main() {
|
| @@ -690,7 +690,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_parameter_BAD_hasExplicitType() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| foo(f(int p)) {}
|
| main() {
|
| foo((num test) {});
|
| @@ -700,7 +700,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_parameter_BAD_noPropagatedType() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| foo(f(p)) {}
|
| main() {
|
| foo((test) {});
|
| @@ -710,7 +710,7 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_parameter_OK() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| foo(f(int p)) {}
|
| main() {
|
| foo((test) {});
|
| @@ -728,21 +728,21 @@ main() {
|
| }
|
|
|
| test_addTypeAnnotation_topLevelField_BAD_multiple() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| var A = 1, V = '';
|
| ''');
|
| await assertNoAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION);
|
| }
|
|
|
| test_addTypeAnnotation_topLevelField_BAD_noValue() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| var V;
|
| ''');
|
| await assertNoAssistAt('var ', DartAssistKind.ADD_TYPE_ANNOTATION);
|
| }
|
|
|
| test_addTypeAnnotation_topLevelField_OK_int() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| var V = 0;
|
| ''');
|
| await assertHasAssistAt(
|
| @@ -754,7 +754,7 @@ int V = 0;
|
| }
|
|
|
| test_assignToLocalVariable() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| List<int> bytes;
|
| readBytes();
|
| @@ -779,7 +779,7 @@ List<int> readBytes() => <int>[];
|
| }
|
|
|
| test_assignToLocalVariable_alreadyAssignment() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var vvv;
|
| vvv = 42;
|
| @@ -789,7 +789,7 @@ main() {
|
| }
|
|
|
| test_assignToLocalVariable_inClosure() async {
|
| - resolveTestUnit(r'''
|
| + await resolveTestUnit(r'''
|
| main() {
|
| print(() {
|
| 12345;
|
| @@ -809,7 +809,7 @@ main() {
|
| }
|
|
|
| test_assignToLocalVariable_invocationArgument() async {
|
| - resolveTestUnit(r'''
|
| + await resolveTestUnit(r'''
|
| main() {
|
| f(12345);
|
| }
|
| @@ -819,7 +819,7 @@ int f(p) {}
|
| }
|
|
|
| test_assignToLocalVariable_throw() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| throw 42;
|
| }
|
| @@ -828,7 +828,7 @@ main() {
|
| }
|
|
|
| test_assignToLocalVariable_void() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| f();
|
| }
|
| @@ -838,7 +838,7 @@ void f() {}
|
| }
|
|
|
| test_convertDocumentationIntoBlock_BAD_alreadyBlock() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| /**
|
| * AAAAAAA
|
| */
|
| @@ -849,7 +849,7 @@ class A {}
|
| }
|
|
|
| test_convertDocumentationIntoBlock_BAD_notDocumentation() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| // AAAA
|
| class A {}
|
| ''');
|
| @@ -858,7 +858,7 @@ class A {}
|
| }
|
|
|
| test_convertDocumentationIntoBlock_OK_noSpaceBeforeText() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| /// AAAAA
|
| ///BBBBB
|
| @@ -884,7 +884,7 @@ class A {
|
| }
|
|
|
| test_convertDocumentationIntoBlock_OK_onReference() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| /// AAAAAAA [int] AAAAAAA
|
| class A {}
|
| ''');
|
| @@ -900,7 +900,7 @@ class A {}
|
| }
|
|
|
| test_convertDocumentationIntoBlock_OK_onText() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| /// AAAAAAA [int] AAAAAAA
|
| /// BBBBBBBB BBBB BBBB
|
| @@ -924,7 +924,7 @@ class A {
|
| }
|
|
|
| test_convertDocumentationIntoLine_BAD_alreadyLine() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| /// AAAAAAA
|
| class A {}
|
| ''');
|
| @@ -933,7 +933,7 @@ class A {}
|
| }
|
|
|
| test_convertDocumentationIntoLine_BAD_notDocumentation() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| /* AAAA */
|
| class A {}
|
| ''');
|
| @@ -942,7 +942,7 @@ class A {}
|
| }
|
|
|
| test_convertDocumentationIntoLine_OK_onReference() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| /**
|
| * AAAAAAA [int] AAAAAAA
|
| */
|
| @@ -958,7 +958,7 @@ class A {}
|
| }
|
|
|
| test_convertDocumentationIntoLine_OK_onText() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| /**
|
| * AAAAAAA [int] AAAAAAA
|
| @@ -982,7 +982,7 @@ class A {
|
| }
|
|
|
| test_convertDocumentationIntoLine_OK_onText_hasFirstLine() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| /** AAAAAAA [int] AAAAAAA
|
| * BBBBBBBB BBBB BBBB
|
| @@ -1005,14 +1005,14 @@ class A {
|
| }
|
|
|
| test_convertToBlockBody_BAD_noEnclosingFunction() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| var v = 123;
|
| ''');
|
| await assertNoAssistAt('v =', DartAssistKind.CONVERT_INTO_BLOCK_BODY);
|
| }
|
|
|
| test_convertToBlockBody_BAD_notExpressionBlock() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| fff() {
|
| return 123;
|
| }
|
| @@ -1021,7 +1021,7 @@ fff() {
|
| }
|
|
|
| test_convertToBlockBody_OK_async() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| mmm() async => 123;
|
| }
|
| @@ -1039,7 +1039,7 @@ class A {
|
| }
|
|
|
| test_convertToBlockBody_OK_closure() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| setup(x) {}
|
| main() {
|
| setup(() => 42);
|
| @@ -1065,7 +1065,7 @@ main() {
|
| }
|
|
|
| test_convertToBlockBody_OK_closure_voidExpression() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| setup(x) {}
|
| main() {
|
| setup(() => print('done'));
|
| @@ -1091,7 +1091,7 @@ main() {
|
| }
|
|
|
| test_convertToBlockBody_OK_constructor() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| factory A() => null;
|
| }
|
| @@ -1109,7 +1109,7 @@ class A {
|
| }
|
|
|
| test_convertToBlockBody_OK_method() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| mmm() => 123;
|
| }
|
| @@ -1127,7 +1127,7 @@ class A {
|
| }
|
|
|
| test_convertToBlockBody_OK_onName() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| fff() => 123;
|
| ''');
|
| await assertHasAssistAt(
|
| @@ -1141,7 +1141,7 @@ fff() {
|
| }
|
|
|
| test_convertToBlockBody_OK_onValue() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| fff() => 123;
|
| ''');
|
| await assertHasAssistAt(
|
| @@ -1155,7 +1155,7 @@ fff() {
|
| }
|
|
|
| test_convertToExpressionBody_BAD_already() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| fff() => 42;
|
| ''');
|
| await assertNoAssistAt(
|
| @@ -1163,7 +1163,7 @@ fff() => 42;
|
| }
|
|
|
| test_convertToExpressionBody_BAD_moreThanOneStatement() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| fff() {
|
| var v = 42;
|
| return v;
|
| @@ -1174,14 +1174,14 @@ fff() {
|
| }
|
|
|
| test_convertToExpressionBody_BAD_noEnclosingFunction() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| var V = 42;
|
| ''');
|
| await assertNoAssistAt('V = ', DartAssistKind.CONVERT_INTO_EXPRESSION_BODY);
|
| }
|
|
|
| test_convertToExpressionBody_BAD_noReturn() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| fff() {
|
| var v = 42;
|
| }
|
| @@ -1191,7 +1191,7 @@ fff() {
|
| }
|
|
|
| test_convertToExpressionBody_BAD_noReturnValue() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| fff() {
|
| return;
|
| }
|
| @@ -1201,7 +1201,7 @@ fff() {
|
| }
|
|
|
| test_convertToExpressionBody_OK_async() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| mmm() async {
|
| return 42;
|
| @@ -1219,7 +1219,7 @@ class A {
|
| }
|
|
|
| test_convertToExpressionBody_OK_closure() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| setup(x) {}
|
| main() {
|
| setup(() {
|
| @@ -1239,7 +1239,7 @@ main() {
|
| }
|
|
|
| test_convertToExpressionBody_OK_closure_voidExpression() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| setup(x) {}
|
| main() {
|
| setup(() {
|
| @@ -1259,7 +1259,7 @@ main() {
|
| }
|
|
|
| test_convertToExpressionBody_OK_constructor() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| factory A() {
|
| return null;
|
| @@ -1277,7 +1277,7 @@ class A {
|
| }
|
|
|
| test_convertToExpressionBody_OK_function_onBlock() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| fff() {
|
| return 42;
|
| }
|
| @@ -1291,7 +1291,7 @@ fff() => 42;
|
| }
|
|
|
| test_convertToExpressionBody_OK_function_onName() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| fff() {
|
| return 42;
|
| }
|
| @@ -1305,7 +1305,7 @@ fff() => 42;
|
| }
|
|
|
| test_convertToExpressionBody_OK_method_onBlock() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| m() { // marker
|
| return 42;
|
| @@ -1323,7 +1323,7 @@ class A {
|
| }
|
|
|
| test_convertToExpressionBody_OK_topFunction_onReturnStatement() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| fff() {
|
| return 42;
|
| }
|
| @@ -1337,7 +1337,7 @@ fff() => 42;
|
| }
|
|
|
| test_convertToFieldParameter_BAD_additionalUse() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int aaa2;
|
| int bbb2;
|
| @@ -1348,7 +1348,7 @@ class A {
|
| }
|
|
|
| test_convertToFieldParameter_BAD_notPureAssignment() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int aaa2;
|
| A(int aaa) : aaa2 = aaa * 2;
|
| @@ -1358,7 +1358,7 @@ class A {
|
| }
|
|
|
| test_convertToFieldParameter_OK_firstInitializer() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| double aaa2;
|
| int bbb2;
|
| @@ -1378,7 +1378,7 @@ class A {
|
| }
|
|
|
| test_convertToFieldParameter_OK_onParameterName_inInitializer() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int test2;
|
| A(int test) : test2 = test {
|
| @@ -1398,7 +1398,7 @@ class A {
|
| }
|
|
|
| test_convertToFieldParameter_OK_onParameterName_inParameters() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int test;
|
| A(int test) : test = test {
|
| @@ -1418,7 +1418,7 @@ class A {
|
| }
|
|
|
| test_convertToFieldParameter_OK_secondInitializer() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| double aaa2;
|
| int bbb2;
|
| @@ -1438,7 +1438,7 @@ class A {
|
| }
|
|
|
| test_convertToFinalField_BAD_hasSetter_inThisClass() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int get foo => null;
|
| void set foo(_) {}
|
| @@ -1448,7 +1448,7 @@ class A {
|
| }
|
|
|
| test_convertToFinalField_BAD_notExpressionBody() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int get foo {
|
| int v = 1 + 2;
|
| @@ -1460,7 +1460,7 @@ class A {
|
| }
|
|
|
| test_convertToFinalField_BAD_notGetter() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int foo() => 42;
|
| }
|
| @@ -1469,7 +1469,7 @@ class A {
|
| }
|
|
|
| test_convertToFinalField_OK_blockBody_onlyReturnStatement() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int get foo {
|
| return 1 + 2;
|
| @@ -1487,7 +1487,7 @@ class A {
|
| }
|
|
|
| test_convertToFinalField_OK_hasOverride() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| const myAnnotation = const Object();
|
| class A {
|
| @myAnnotation
|
| @@ -1507,7 +1507,7 @@ class A {
|
| }
|
|
|
| test_convertToFinalField_OK_hasSetter_inSuper() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| void set foo(_) {}
|
| }
|
| @@ -1529,7 +1529,7 @@ class B extends A {
|
| }
|
|
|
| test_convertToFinalField_OK_notNull() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int get foo => 1 + 2;
|
| }
|
| @@ -1545,7 +1545,7 @@ class A {
|
| }
|
|
|
| test_convertToFinalField_OK_null() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int get foo => null;
|
| }
|
| @@ -1561,7 +1561,7 @@ class A {
|
| }
|
|
|
| test_convertToFinalField_OK_onName() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int get foo => 42;
|
| }
|
| @@ -1577,7 +1577,7 @@ class A {
|
| }
|
|
|
| test_convertToFinalField_OK_onReturnType_parameterized() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| List<int> get foo => null;
|
| }
|
| @@ -1593,7 +1593,7 @@ class A {
|
| }
|
|
|
| test_convertToFinalField_OK_onReturnType_simple() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int get foo => 42;
|
| }
|
| @@ -1609,7 +1609,7 @@ class A {
|
| }
|
|
|
| test_convertToForIndex_BAD_bodyNotBlock() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| for (String item in items) print(item);
|
| }
|
| @@ -1619,7 +1619,7 @@ main(List<String> items) {
|
| }
|
|
|
| test_convertToForIndex_BAD_doesNotDeclareVariable() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| String item;
|
| for (item in items) {
|
| @@ -1631,7 +1631,7 @@ main(List<String> items) {
|
| }
|
|
|
| test_convertToForIndex_BAD_iterableIsNotVariable() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| for (String item in ['a', 'b', 'c']) {
|
| print(item);
|
| @@ -1643,7 +1643,7 @@ main() {
|
| }
|
|
|
| test_convertToForIndex_BAD_iterableNotList() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(Iterable<String> items) {
|
| for (String item in items) {
|
| print(item);
|
| @@ -1655,7 +1655,7 @@ main(Iterable<String> items) {
|
| }
|
|
|
| test_convertToForIndex_BAD_usesIJK() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| for (String item in items) {
|
| print(item);
|
| @@ -1668,7 +1668,7 @@ main(List<String> items) {
|
| }
|
|
|
| test_convertToForIndex_OK_onDeclaredIdentifier_name() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| for (String item in items) {
|
| print(item);
|
| @@ -1689,7 +1689,7 @@ main(List<String> items) {
|
| }
|
|
|
| test_convertToForIndex_OK_onDeclaredIdentifier_type() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| for (String item in items) {
|
| print(item);
|
| @@ -1710,7 +1710,7 @@ main(List<String> items) {
|
| }
|
|
|
| test_convertToForIndex_OK_onFor() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| for (String item in items) {
|
| print(item);
|
| @@ -1731,7 +1731,7 @@ main(List<String> items) {
|
| }
|
|
|
| test_convertToForIndex_OK_usesI() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| for (String item in items) {
|
| int i = 0;
|
| @@ -1752,7 +1752,7 @@ main(List<String> items) {
|
| }
|
|
|
| test_convertToForIndex_OK_usesIJ() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(List<String> items) {
|
| for (String item in items) {
|
| print(item);
|
| @@ -1775,7 +1775,7 @@ main(List<String> items) {
|
| }
|
|
|
| test_convertToGetter_BAD_noInitializer() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| final int foo;
|
| }
|
| @@ -1784,7 +1784,7 @@ class A {
|
| }
|
|
|
| test_convertToGetter_BAD_notFinal() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int foo = 1;
|
| }
|
| @@ -1793,7 +1793,7 @@ class A {
|
| }
|
|
|
| test_convertToGetter_BAD_notSingleField() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| final int foo = 1, bar = 2;
|
| }
|
| @@ -1802,7 +1802,7 @@ class A {
|
| }
|
|
|
| test_convertToGetter_OK() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| const myAnnotation = const Object();
|
| class A {
|
| @myAnnotation
|
| @@ -1822,7 +1822,7 @@ class A {
|
| }
|
|
|
| test_convertToGetter_OK_noType() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| final foo = 42;
|
| }
|
| @@ -1838,7 +1838,7 @@ class A {
|
| }
|
|
|
| test_convertToIsNot_BAD_is_alreadyIsNot() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| p is! String;
|
| }
|
| @@ -1847,7 +1847,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_BAD_is_noEnclosingParenthesis() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| p is String;
|
| }
|
| @@ -1856,7 +1856,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_BAD_is_noPrefix() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| (p is String);
|
| }
|
| @@ -1865,7 +1865,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_BAD_is_notIsExpression() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| 123 + 456;
|
| }
|
| @@ -1875,7 +1875,7 @@ main(p) {
|
|
|
| test_convertToIsNot_BAD_is_notTheNotOperator() async {
|
| verifyNoTestUnitErrors = false;
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| ++(p is String);
|
| }
|
| @@ -1884,7 +1884,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_BAD_not_alreadyIsNot() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| !(p is! String);
|
| }
|
| @@ -1893,7 +1893,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_BAD_not_noEnclosingParenthesis() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| !p;
|
| }
|
| @@ -1902,7 +1902,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_BAD_not_notIsExpression() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| !(p == null);
|
| }
|
| @@ -1912,7 +1912,7 @@ main(p) {
|
|
|
| test_convertToIsNot_BAD_not_notTheNotOperator() async {
|
| verifyNoTestUnitErrors = false;
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| ++(p is String);
|
| }
|
| @@ -1921,7 +1921,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_OK_childOfIs_left() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| !(p is String);
|
| }
|
| @@ -1937,7 +1937,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_OK_childOfIs_right() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| !(p is String);
|
| }
|
| @@ -1953,7 +1953,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_OK_is() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| !(p is String);
|
| }
|
| @@ -1969,7 +1969,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_OK_is_higherPrecedencePrefix() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| !!(p is String);
|
| }
|
| @@ -1985,7 +1985,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_OK_is_not_higherPrecedencePrefix() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| !!(p is String);
|
| }
|
| @@ -2001,7 +2001,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_OK_not() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| !(p is String);
|
| }
|
| @@ -2017,7 +2017,7 @@ main(p) {
|
| }
|
|
|
| test_convertToIsNot_OK_parentheses() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| !(p is String);
|
| }
|
| @@ -2034,7 +2034,7 @@ main(p) {
|
|
|
| test_convertToIsNotEmpty_BAD_noBang() async {
|
| verifyNoTestUnitErrors = false;
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(String str) {
|
| ~str.isEmpty;
|
| }
|
| @@ -2044,7 +2044,7 @@ main(String str) {
|
| }
|
|
|
| test_convertToIsNotEmpty_BAD_noIsNotEmpty() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| bool get isEmpty => false;
|
| }
|
| @@ -2057,7 +2057,7 @@ main(A a) {
|
| }
|
|
|
| test_convertToIsNotEmpty_BAD_notInPrefixExpression() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(String str) {
|
| str.isEmpty;
|
| }
|
| @@ -2067,7 +2067,7 @@ main(String str) {
|
| }
|
|
|
| test_convertToIsNotEmpty_BAD_notIsEmpty() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(int p) {
|
| !p.isEven;
|
| }
|
| @@ -2076,7 +2076,7 @@ main(int p) {
|
| }
|
|
|
| test_convertToIsNotEmpty_OK_on_isEmpty() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(String str) {
|
| !str.isEmpty;
|
| }
|
| @@ -2092,7 +2092,7 @@ main(String str) {
|
| }
|
|
|
| test_convertToIsNotEmpty_OK_on_str() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(String str) {
|
| !str.isEmpty;
|
| }
|
| @@ -2108,7 +2108,7 @@ main(String str) {
|
| }
|
|
|
| test_convertToIsNotEmpty_OK_propertyAccess() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(String str) {
|
| !'text'.isEmpty;
|
| }
|
| @@ -2124,7 +2124,7 @@ main(String str) {
|
| }
|
|
|
| test_convertToNormalParameter_OK_dynamic() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| var test;
|
| A(this.test) {
|
| @@ -2144,7 +2144,7 @@ class A {
|
| }
|
|
|
| test_convertToNormalParameter_OK_firstInitializer() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int test;
|
| A(this.test) {
|
| @@ -2164,7 +2164,7 @@ class A {
|
| }
|
|
|
| test_convertToNormalParameter_OK_secondInitializer() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| double aaa;
|
| int bbb;
|
| @@ -2184,7 +2184,7 @@ class A {
|
| }
|
|
|
| test_encapsulateField_BAD_alreadyPrivate() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int _test = 42;
|
| }
|
| @@ -2196,7 +2196,7 @@ main(A a) {
|
| }
|
|
|
| test_encapsulateField_BAD_final() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| final int test = 42;
|
| }
|
| @@ -2205,7 +2205,7 @@ class A {
|
| }
|
|
|
| test_encapsulateField_BAD_multipleFields() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int aaa, bbb, ccc;
|
| }
|
| @@ -2217,7 +2217,7 @@ main(A a) {
|
| }
|
|
|
| test_encapsulateField_BAD_notOnName() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int test = 1 + 2 + 3;
|
| }
|
| @@ -2227,7 +2227,7 @@ class A {
|
|
|
| test_encapsulateField_BAD_parseError() async {
|
| verifyNoTestUnitErrors = false;
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int; // marker
|
| }
|
| @@ -2239,7 +2239,7 @@ main(A a) {
|
| }
|
|
|
| test_encapsulateField_BAD_static() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| static int test = 42;
|
| }
|
| @@ -2248,7 +2248,7 @@ class A {
|
| }
|
|
|
| test_encapsulateField_OK_hasType() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int test = 42;
|
| A(this.test);
|
| @@ -2278,7 +2278,7 @@ main(A a) {
|
| }
|
|
|
| test_encapsulateField_OK_noType() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| var test = 42;
|
| }
|
| @@ -2306,7 +2306,7 @@ main(A a) {
|
| }
|
|
|
| test_exchangeBinaryExpressionArguments_BAD_extraLength() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| 111 + 222;
|
| }
|
| @@ -2316,7 +2316,7 @@ main() {
|
| }
|
|
|
| test_exchangeBinaryExpressionArguments_BAD_onOperand() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| 111 + 222;
|
| }
|
| @@ -2326,7 +2326,7 @@ main() {
|
| }
|
|
|
| test_exchangeBinaryExpressionArguments_BAD_selectionWithBinary() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| 1 + 2 + 3;
|
| }
|
| @@ -2341,7 +2341,7 @@ main() {
|
| for (int i = 0; i <= 0; i++) {
|
| String initialOperator = initialOperators[i];
|
| String resultOperator = resultOperators[i];
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| bool main(int a, int b) {
|
| return a $initialOperator b;
|
| }
|
| @@ -2358,7 +2358,7 @@ bool main(int a, int b) {
|
| }
|
|
|
| test_exchangeBinaryExpressionArguments_OK_extended_mixOperator_1() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| 1 * 2 * 3 + 4;
|
| }
|
| @@ -2374,7 +2374,7 @@ main() {
|
| }
|
|
|
| test_exchangeBinaryExpressionArguments_OK_extended_mixOperator_2() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| 1 + 2 - 3 + 4;
|
| }
|
| @@ -2390,7 +2390,7 @@ main() {
|
| }
|
|
|
| test_exchangeBinaryExpressionArguments_OK_extended_sameOperator_afterFirst() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| 1 + 2 + 3;
|
| }
|
| @@ -2406,7 +2406,7 @@ main() {
|
| }
|
|
|
| test_exchangeBinaryExpressionArguments_OK_extended_sameOperator_afterSecond() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| 1 + 2 + 3;
|
| }
|
| @@ -2422,7 +2422,7 @@ main() {
|
| }
|
|
|
| test_exchangeBinaryExpressionArguments_OK_simple_afterOperator() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| 1 + 2;
|
| }
|
| @@ -2438,7 +2438,7 @@ main() {
|
| }
|
|
|
| test_exchangeBinaryExpressionArguments_OK_simple_beforeOperator() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| 1 + 2;
|
| }
|
| @@ -2454,7 +2454,7 @@ main() {
|
| }
|
|
|
| test_exchangeBinaryExpressionArguments_OK_simple_fullSelection() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| 1 + 2;
|
| }
|
| @@ -2471,7 +2471,7 @@ main() {
|
| }
|
|
|
| test_exchangeBinaryExpressionArguments_OK_simple_withLength() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| 1 + 2;
|
| }
|
| @@ -2488,7 +2488,7 @@ main() {
|
| }
|
|
|
| test_importAddShow_BAD_hasShow() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'dart:math' show PI;
|
| main() {
|
| PI;
|
| @@ -2498,21 +2498,21 @@ main() {
|
| }
|
|
|
| test_importAddShow_BAD_unresolvedUri() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import '/no/such/lib.dart';
|
| ''');
|
| await assertNoAssistAt('import ', DartAssistKind.IMPORT_ADD_SHOW);
|
| }
|
|
|
| test_importAddShow_BAD_unused() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'dart:math';
|
| ''');
|
| await assertNoAssistAt('import ', DartAssistKind.IMPORT_ADD_SHOW);
|
| }
|
|
|
| test_importAddShow_OK_hasUnresolvedIdentifier() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'dart:math';
|
| main(x) {
|
| PI;
|
| @@ -2532,7 +2532,7 @@ main(x) {
|
| }
|
|
|
| test_importAddShow_OK_onDirective() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'dart:math';
|
| main() {
|
| PI;
|
| @@ -2554,7 +2554,7 @@ main() {
|
| }
|
|
|
| test_importAddShow_OK_onUri() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| import 'dart:math';
|
| main() {
|
| PI;
|
| @@ -2576,7 +2576,7 @@ main() {
|
| }
|
|
|
| test_introduceLocalTestedType_BAD_notBlock() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| if (p is String)
|
| print('not a block');
|
| @@ -2586,7 +2586,7 @@ main(p) {
|
| }
|
|
|
| test_introduceLocalTestedType_BAD_notIsExpression() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| if (p == null) {
|
| }
|
| @@ -2596,7 +2596,7 @@ main(p) {
|
| }
|
|
|
| test_introduceLocalTestedType_BAD_notStatement() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class C {
|
| bool b;
|
| C(v) : b = v is int;
|
| @@ -2605,7 +2605,7 @@ class C {
|
| }
|
|
|
| test_introduceLocalTestedType_OK_if_is() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class MyTypeName {}
|
| main(p) {
|
| if (p is MyTypeName) {
|
| @@ -2635,7 +2635,7 @@ main(p) {
|
| }
|
|
|
| test_introduceLocalTestedType_OK_if_isNot() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class MyTypeName {}
|
| main(p) {
|
| if (p is! MyTypeName) {
|
| @@ -2665,7 +2665,7 @@ main(p) {
|
| }
|
|
|
| test_introduceLocalTestedType_OK_while() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(p) {
|
| while (p is String) {
|
| }
|
| @@ -2687,14 +2687,14 @@ main(p) {
|
| }
|
|
|
| test_invalidSelection() async {
|
| - resolveTestUnit('');
|
| + await resolveTestUnit('');
|
| List<Assist> assists = await computeAssists(plugin, context,
|
| resolutionMap.elementDeclaredByCompilationUnit(testUnit).source, -1, 0);
|
| expect(assists, isEmpty);
|
| }
|
|
|
| test_invertIfStatement_blocks() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (true) {
|
| 0;
|
| @@ -2718,7 +2718,7 @@ main() {
|
| }
|
|
|
| test_invertIfStatement_statements() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (true)
|
| 0;
|
| @@ -2740,7 +2740,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_BAD_innerNotIf() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| print(0);
|
| @@ -2751,7 +2751,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_BAD_innerWithElse() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -2766,7 +2766,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_BAD_statementAfterInner() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -2780,7 +2780,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_BAD_statementBeforeInner() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| print(1);
|
| @@ -2794,7 +2794,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_BAD_targetNotIf() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| print(0);
|
| }
|
| @@ -2803,7 +2803,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_BAD_targetWithElse() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -2818,7 +2818,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_OK_conditionAndOr() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2 || 3 == 3) {
|
| @@ -2840,7 +2840,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_OK_conditionInvocation() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (isCheck()) {
|
| if (2 == 2) {
|
| @@ -2864,7 +2864,7 @@ bool isCheck() => false;
|
| }
|
|
|
| test_joinIfStatementInner_OK_conditionOrAnd() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1 || 2 == 2) {
|
| if (3 == 3) {
|
| @@ -2886,7 +2886,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_OK_onCondition() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -2908,7 +2908,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_OK_simpleConditions_block_block() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -2930,7 +2930,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_OK_simpleConditions_block_single() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2)
|
| @@ -2951,7 +2951,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_OK_simpleConditions_single_blockMulti() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -2977,7 +2977,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementInner_OK_simpleConditions_single_blockOne() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1)
|
| if (2 == 2) {
|
| @@ -2998,7 +2998,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_BAD_outerNotIf() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| print(0);
|
| @@ -3009,7 +3009,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_BAD_outerWithElse() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -3024,7 +3024,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_BAD_statementAfterInner() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -3038,7 +3038,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_BAD_statementBeforeInner() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| print(1);
|
| @@ -3052,7 +3052,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_BAD_targetNotIf() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| print(0);
|
| }
|
| @@ -3061,7 +3061,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_BAD_targetWithElse() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -3076,7 +3076,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_OK_conditionAndOr() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2 || 3 == 3) {
|
| @@ -3098,7 +3098,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_OK_conditionInvocation() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (isCheck()) {
|
| @@ -3122,7 +3122,7 @@ bool isCheck() => false;
|
| }
|
|
|
| test_joinIfStatementOuter_OK_conditionOrAnd() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1 || 2 == 2) {
|
| if (3 == 3) {
|
| @@ -3144,7 +3144,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_OK_onCondition() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -3166,7 +3166,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_OK_simpleConditions_block_block() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -3188,7 +3188,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_OK_simpleConditions_block_single() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2)
|
| @@ -3209,7 +3209,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_OK_simpleConditions_single_blockMulti() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1) {
|
| if (2 == 2) {
|
| @@ -3235,7 +3235,7 @@ main() {
|
| }
|
|
|
| test_joinIfStatementOuter_OK_simpleConditions_single_blockOne() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1)
|
| if (2 == 2) {
|
| @@ -3256,7 +3256,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onAssignment_BAD_hasInitializer() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = 1;
|
| v = 2;
|
| @@ -3266,7 +3266,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onAssignment_BAD_notAdjacent() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| var bar;
|
| @@ -3277,7 +3277,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onAssignment_BAD_notAssignment() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| v += 1;
|
| @@ -3287,7 +3287,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onAssignment_BAD_notDeclaration() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main(var v) {
|
| v = 1;
|
| }
|
| @@ -3296,7 +3296,7 @@ main(var v) {
|
| }
|
|
|
| test_joinVariableDeclaration_onAssignment_BAD_notLeftArgument() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| 1 + v; // marker
|
| @@ -3307,7 +3307,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onAssignment_BAD_notOneVariable() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v, v2;
|
| v = 1;
|
| @@ -3318,7 +3318,7 @@ main() {
|
|
|
| test_joinVariableDeclaration_onAssignment_BAD_notResolved() async {
|
| verifyNoTestUnitErrors = false;
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| x = 1;
|
| @@ -3328,7 +3328,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onAssignment_BAD_notSameBlock() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| {
|
| @@ -3340,7 +3340,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onAssignment_OK() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| v = 1;
|
| @@ -3357,7 +3357,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onDeclaration_BAD_hasInitializer() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = 1;
|
| v = 2;
|
| @@ -3367,7 +3367,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onDeclaration_BAD_lastStatement() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (true)
|
| var v;
|
| @@ -3377,7 +3377,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onDeclaration_BAD_nextNotAssignmentExpression() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| 42;
|
| @@ -3387,7 +3387,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onDeclaration_BAD_nextNotExpressionStatement() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| if (true) return;
|
| @@ -3397,7 +3397,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onDeclaration_BAD_nextNotPureAssignment() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| v += 1;
|
| @@ -3407,7 +3407,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onDeclaration_BAD_notOneVariable() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v, v2;
|
| v = 1;
|
| @@ -3417,7 +3417,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onDeclaration_OK_onName() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| v = 1;
|
| @@ -3434,7 +3434,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onDeclaration_OK_onType() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| int v;
|
| v = 1;
|
| @@ -3451,7 +3451,7 @@ main() {
|
| }
|
|
|
| test_joinVariableDeclaration_onDeclaration_OK_onVar() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| v = 1;
|
| @@ -3468,7 +3468,7 @@ main() {
|
| }
|
|
|
| test_removeTypeAnnotation_classField_OK() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| int v = 1;
|
| }
|
| @@ -3484,7 +3484,7 @@ class A {
|
| }
|
|
|
| test_removeTypeAnnotation_classField_OK_final() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| class A {
|
| final int v = 1;
|
| }
|
| @@ -3500,7 +3500,7 @@ class A {
|
| }
|
|
|
| test_removeTypeAnnotation_localVariable_BAD_onInitializer() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| final int v = 1;
|
| }
|
| @@ -3509,7 +3509,7 @@ main() {
|
| }
|
|
|
| test_removeTypeAnnotation_localVariable_OK() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| int a = 1, b = 2;
|
| }
|
| @@ -3525,7 +3525,7 @@ main() {
|
| }
|
|
|
| test_removeTypeAnnotation_localVariable_OK_const() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| const int v = 1;
|
| }
|
| @@ -3541,7 +3541,7 @@ main() {
|
| }
|
|
|
| test_removeTypeAnnotation_localVariable_OK_final() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| final int v = 1;
|
| }
|
| @@ -3558,14 +3558,14 @@ main() {
|
|
|
| test_removeTypeAnnotation_topLevelVariable_BAD_syntheticName() async {
|
| verifyNoTestUnitErrors = false;
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| MyType
|
| ''');
|
| await assertNoAssistAt('MyType', DartAssistKind.REMOVE_TYPE_ANNOTATION);
|
| }
|
|
|
| test_removeTypeAnnotation_topLevelVariable_OK() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| int V = 1;
|
| ''');
|
| await assertHasAssistAt(
|
| @@ -3577,7 +3577,7 @@ var V = 1;
|
| }
|
|
|
| test_removeTypeAnnotation_topLevelVariable_OK_final() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| final int V = 1;
|
| ''');
|
| await assertHasAssistAt(
|
| @@ -3589,7 +3589,7 @@ final V = 1;
|
| }
|
|
|
| test_replaceConditionalWithIfElse_BAD_noEnclosingStatement() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| var v = true ? 111 : 222;
|
| ''');
|
| await assertNoAssistAt(
|
| @@ -3597,7 +3597,7 @@ var v = true ? 111 : 222;
|
| }
|
|
|
| test_replaceConditionalWithIfElse_BAD_notConditional() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = 42;
|
| }
|
| @@ -3607,7 +3607,7 @@ main() {
|
| }
|
|
|
| test_replaceConditionalWithIfElse_OK_assignment() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v;
|
| v = true ? 111 : 222;
|
| @@ -3644,7 +3644,7 @@ main() {
|
| }
|
|
|
| test_replaceConditionalWithIfElse_OK_return() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| return true ? 111 : 222;
|
| }
|
| @@ -3664,7 +3664,7 @@ main() {
|
| }
|
|
|
| test_replaceConditionalWithIfElse_OK_variableDeclaration() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| int a = 1, vvv = true ? 111 : 222, b = 2;
|
| }
|
| @@ -3685,7 +3685,7 @@ main() {
|
| }
|
|
|
| test_replaceIfElseWithConditional_BAD_expressionVsReturn() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (true) {
|
| print(42);
|
| @@ -3699,7 +3699,7 @@ main() {
|
| }
|
|
|
| test_replaceIfElseWithConditional_BAD_notIfStatement() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| print(0);
|
| }
|
| @@ -3709,7 +3709,7 @@ main() {
|
| }
|
|
|
| test_replaceIfElseWithConditional_BAD_notSingleStatement() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| int vvv;
|
| if (true) {
|
| @@ -3726,7 +3726,7 @@ main() {
|
| }
|
|
|
| test_replaceIfElseWithConditional_OK_assignment() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| int vvv;
|
| if (true) {
|
| @@ -3748,7 +3748,7 @@ main() {
|
| }
|
|
|
| test_replaceIfElseWithConditional_OK_return() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (true) {
|
| return 111;
|
| @@ -3768,7 +3768,7 @@ main() {
|
| }
|
|
|
| test_splitAndCondition_BAD_hasElse() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1 && 2 == 2) {
|
| print(1);
|
| @@ -3781,7 +3781,7 @@ main() {
|
| }
|
|
|
| test_splitAndCondition_BAD_notAnd() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1 || 2 == 2) {
|
| print(0);
|
| @@ -3792,7 +3792,7 @@ main() {
|
| }
|
|
|
| test_splitAndCondition_BAD_notPartOfIf() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| print(1 == 1 && 2 == 2);
|
| }
|
| @@ -3801,7 +3801,7 @@ main() {
|
| }
|
|
|
| test_splitAndCondition_BAD_notTopLevelAnd() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (true || (1 == 1 && 2 == 2)) {
|
| print(0);
|
| @@ -3816,7 +3816,7 @@ main() {
|
| }
|
|
|
| test_splitAndCondition_OK_innerAndExpression() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1 && 2 == 2 && 3 == 3) {
|
| print(0);
|
| @@ -3838,7 +3838,7 @@ main() {
|
| }
|
|
|
| test_splitAndCondition_OK_thenBlock() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (true && false) {
|
| print(0);
|
| @@ -3866,7 +3866,7 @@ main() {
|
| }
|
|
|
| test_splitAndCondition_OK_thenStatement() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (true && false)
|
| print(0);
|
| @@ -3885,7 +3885,7 @@ main() {
|
| }
|
|
|
| test_splitAndCondition_wrong() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| if (1 == 1 && 2 == 2) {
|
| print(0);
|
| @@ -3903,7 +3903,7 @@ main() {
|
| }
|
|
|
| test_splitVariableDeclaration_BAD_notOneVariable() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = 1, v2;
|
| }
|
| @@ -3912,7 +3912,7 @@ main() {
|
| }
|
|
|
| test_splitVariableDeclaration_OK_onName() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = 1;
|
| }
|
| @@ -3929,7 +3929,7 @@ main() {
|
| }
|
|
|
| test_splitVariableDeclaration_OK_onType() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| int v = 1;
|
| }
|
| @@ -3946,7 +3946,7 @@ main() {
|
| }
|
|
|
| test_splitVariableDeclaration_OK_onVar() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| var v = 1;
|
| }
|
| @@ -3963,7 +3963,7 @@ main() {
|
| }
|
|
|
| test_surroundWith_block() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| // start
|
| print(0);
|
| @@ -3987,7 +3987,7 @@ main() {
|
| }
|
|
|
| test_surroundWith_doWhile() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| // start
|
| print(0);
|
| @@ -4011,7 +4011,7 @@ main() {
|
| }
|
|
|
| test_surroundWith_for() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| // start
|
| print(0);
|
| @@ -4035,7 +4035,7 @@ main() {
|
| }
|
|
|
| test_surroundWith_forIn() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| // start
|
| print(0);
|
| @@ -4059,7 +4059,7 @@ main() {
|
| }
|
|
|
| test_surroundWith_if() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| // start
|
| print(0);
|
| @@ -4083,7 +4083,7 @@ main() {
|
| }
|
|
|
| test_surroundWith_tryCatch() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| // start
|
| print(0);
|
| @@ -4109,7 +4109,7 @@ main() {
|
| }
|
|
|
| test_surroundWith_tryFinally() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| // start
|
| print(0);
|
| @@ -4135,7 +4135,7 @@ main() {
|
| }
|
|
|
| test_surroundWith_while() async {
|
| - resolveTestUnit('''
|
| + await resolveTestUnit('''
|
| main() {
|
| // start
|
| print(0);
|
|
|