diff --git a/pkg/analyzer/test/generated/compile_time_error_code.dart b/pkg/analyzer/test/generated/compile_time_error_code.dart index d5c117922fec..e5e986c9ccb8 100644 --- a/pkg/analyzer/test/generated/compile_time_error_code.dart +++ b/pkg/analyzer/test/generated/compile_time_error_code.dart @@ -1800,7 +1800,7 @@ var b2 = const bool.fromEnvironment('x', defaultValue: 1); // The type of the defaultValue needs to be correct even when the default // value isn't used (because the variable is defined in the environment). driver.declaredVariables = new DeclaredVariables.fromMap({'x': 'true'}); - assertErrorsInCode(''' + await assertErrorsInCode(''' var b = const bool.fromEnvironment('x', defaultValue: 1); ''', [ error(CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, 8, 48), diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart index f9dac605e53c..1e77ec886bf6 100644 --- a/pkg/analyzer/test/generated/resolver_test.dart +++ b/pkg/analyzer/test/generated/resolver_test.dart @@ -171,7 +171,7 @@ class EnclosedScopeTest extends DriverResolutionTest { @reflectiveTest class ErrorResolverTest extends DriverResolutionTest { test_breakLabelOnSwitchMember() async { - assertErrorsInCode(r''' + await assertErrorsInCode(r''' class A { void m(int i) { switch (i) { @@ -187,7 +187,7 @@ class A { } test_continueLabelOnSwitch() async { - assertErrorsInCode(r''' + await assertErrorsInCode(r''' class A { void m(int i) { l: switch (i) { diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart index 244ccf13c484..d8a95c8c9f1a 100644 --- a/pkg/analyzer/test/generated/static_warning_code_test.dart +++ b/pkg/analyzer/test/generated/static_warning_code_test.dart @@ -759,7 +759,7 @@ main(void x) sync* { test_importDuplicatedLibraryNamed() async { newFile("/test/lib/lib1.dart", content: "library lib;"); newFile("/test/lib/lib2.dart", content: "library lib;"); - assertErrorsInCode(''' + await assertErrorsInCode(''' library test; import 'lib1.dart'; import 'lib2.dart';''', [ @@ -773,7 +773,7 @@ import 'lib2.dart';''', [ newFile("/test/lib/lib1.dart", content: ''' part of lib; class A {}'''); - assertErrorsInCode(''' + await assertErrorsInCode(''' library lib; import 'lib1.dart' deferred as p; var a = new p.A();''', [ diff --git a/pkg/analyzer/test/src/dart/resolution/namespace_test.dart b/pkg/analyzer/test/src/dart/resolution/namespace_test.dart index 7cceecc9e676..f5b0bf7f3f7f 100644 --- a/pkg/analyzer/test/src/dart/resolution/namespace_test.dart +++ b/pkg/analyzer/test/src/dart/resolution/namespace_test.dart @@ -21,7 +21,7 @@ class ImportResolutionTest extends DriverResolutionTest { newFile('/test/lib/declares_never.dart', content: ''' class Never {} '''); - assertNoErrorsInCode(r''' + await assertNoErrorsInCode(r''' import 'declares_never.dart'; Never f() => throw 'foo'; diff --git a/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart b/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart index 26f5983ce4ac..2a9c6709279d 100644 --- a/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart +++ b/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart @@ -17,7 +17,7 @@ main() { @reflectiveTest class AmbiguousSetOrMapLiteralBothTest extends DriverResolutionTest { test_setAndMap() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' Map map; Set set; var c = {...set, ...map}; @@ -39,7 +39,7 @@ union(a, b) => !{...a, ...b}; } test_setAndMap() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' var map; var set; var c = {...set, ...map}; diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart index 700ae9ecb716..4aa435c24bc2 100644 --- a/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart +++ b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart @@ -25,7 +25,7 @@ library deprecated_library; class A {} '''); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'deprecated_library.dart'; f(A a) {} ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE], @@ -43,7 +43,7 @@ library deprecated_library; class A {} '''); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'deprecated_library.dart'; f(A a) {} ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE], @@ -127,7 +127,7 @@ library deprecated_library; class A {} '''); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'deprecated_library.dart'; f(A a) {} ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE], @@ -300,7 +300,7 @@ class A { } test_methodInvocation_constructor() async { - assertErrorsInCode(r''' + await assertErrorsInCode(r''' class A { @Deprecated('0.9') m() {} @@ -333,7 +333,7 @@ library deprecated_library; class A {} '''); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'deprecated_library.dart'; f(A a) {} ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE], @@ -458,7 +458,7 @@ library deprecated_library; class A {} '''); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'package:foo/foo.dart'; f(A a) {} ''', // This is a cross-package deprecated member usage. @@ -477,7 +477,7 @@ class A {} newFile('/workspace/project/BUILD'); newFolder('/workspace/bazel-genfiles'); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'package:foo/foo.dart'; f(A a) {} ''', // This is a cross-package deprecated member usage. @@ -497,7 +497,7 @@ library deprecated_library; class A {} '''); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import '../../project_a/lib/deprecated_library.dart'; f(A a) {} ''', // This is a same-workspace, cross-package deprecated member usage. @@ -513,7 +513,7 @@ class A {} '''); newPubPackage('/pkg1'); - assertErrorsInCode(''' + await assertErrorsInCode(''' export 'package:foo/foo.dart'; ''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart'); } @@ -534,7 +534,7 @@ class A {} 'BAR=bar\n'); newFile('/workspace/out/debug-x87_128/dartlang/gen/project/foo.packages'); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'package:foo/foo.dart'; f(A a) {} ''', // This is a cross-package deprecated member usage. @@ -560,7 +560,7 @@ library deprecated_library; class A {} '''); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import '../../project_a/lib/deprecated_library.dart'; f(A a) {} ''', // This is a same-workspace, cross-package deprecated member usage. @@ -596,7 +596,7 @@ class A { '''); newPubPackage('/pkg1'); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'package:foo/foo.dart'; void main() => A().m(); ''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart'); @@ -611,7 +611,7 @@ class A { '''); newPubPackage('/pkg1'); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'package:foo/foo.dart'; void main() => A().m(); ''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart'); @@ -626,7 +626,7 @@ class A {} newFolder('/workspace/.dart_tool/build/generated/project/lib'); newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'package:foo/foo.dart'; f(A a) {} ''', // This is a cross-package deprecated member usage. diff --git a/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart b/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart index 28b987a50b33..091082baaa1b 100644 --- a/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart +++ b/pkg/analyzer/test/src/diagnostics/final_not_initialized_test.dart @@ -26,24 +26,24 @@ class FinalNotInitializedWithNnbdTest extends DriverResolutionTest { ..contextFeatures = new FeatureSet.forTesting( sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]); - test_field_noConstructor_initializer() { - assertNoErrorsInCode(''' + test_field_noConstructor_initializer() async { + await assertNoErrorsInCode(''' class C { late final f = 1; } '''); } - test_field_noConstructor_noInitializer() { - assertNoErrorsInCode(''' + test_field_noConstructor_noInitializer() async { + await assertNoErrorsInCode(''' class C { late final f; } '''); } - test_field_unnamedConstructor_constructorInitializer() { - assertNoErrorsInCode(''' + test_field_unnamedConstructor_constructorInitializer() async { + await assertNoErrorsInCode(''' class C { late final f; C() : f = 2; @@ -51,8 +51,8 @@ class C { '''); } - test_field_unnamedConstructor_fieldFormalParameter() { - assertNoErrorsInCode(''' + test_field_unnamedConstructor_fieldFormalParameter() async { + await assertNoErrorsInCode(''' class C { late final f; C(this.f); @@ -60,8 +60,8 @@ class C { '''); } - test_field_unnamedConstructor_initializer() { - assertNoErrorsInCode(''' + test_field_unnamedConstructor_initializer() async { + await assertNoErrorsInCode(''' class C { late final f = 1; C(); @@ -69,8 +69,8 @@ class C { '''); } - test_field_unnamedConstructor_noInitializer() { - assertNoErrorsInCode(''' + test_field_unnamedConstructor_noInitializer() async { + await assertNoErrorsInCode(''' class C { late final f; C(); @@ -78,16 +78,16 @@ class C { '''); } - test_localVariable_initializer() { - assertNoErrorsInCode(''' + test_localVariable_initializer() async { + await assertNoErrorsInCode(''' f() { late final x = 1; } '''); } - test_localVariable_noInitializer() { - assertNoErrorsInCode(''' + test_localVariable_noInitializer() async { + await assertNoErrorsInCode(''' f() { late final x; } diff --git a/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart b/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart index 1fe9914a893e..01870b67e506 100644 --- a/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart +++ b/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart @@ -20,7 +20,7 @@ main() { @reflectiveTest class NonBoolConditionTest extends DriverResolutionTest { test_ifElement() async { - assertErrorsInCode( + await assertErrorsInCode( ''' const c = [if (3) 1]; ''', diff --git a/pkg/analyzer/test/src/diagnostics/non_null_opt_out_test.dart b/pkg/analyzer/test/src/diagnostics/non_null_opt_out_test.dart index 933fa1bad305..45a94068a3b3 100644 --- a/pkg/analyzer/test/src/diagnostics/non_null_opt_out_test.dart +++ b/pkg/analyzer/test/src/diagnostics/non_null_opt_out_test.dart @@ -24,7 +24,7 @@ class NonNullOptOutTest extends DriverResolutionTest { sdkVersion: '2.3.0', additionalFeatures: [Feature.non_nullable]); test_nnbd_optOut_invalidSyntax() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' // @dart = 2.2 // NNBD syntax is not allowed f(x, z) { (x is String?) ? x : z; } @@ -32,7 +32,7 @@ f(x, z) { (x is String?) ? x : z; } } test_nnbd_optOut_late() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' // @dart = 2.2 class C { // "late" is allowed as an identifier diff --git a/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_static_field_test.dart b/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_static_field_test.dart index 233eb2b9d756..5a72179cdc2e 100644 --- a/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_static_field_test.dart +++ b/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_static_field_test.dart @@ -22,7 +22,7 @@ class NotInitializedNonNullableStaticFieldTest extends DriverResolutionTest { AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable]; test_futureOr_questionArgument_none() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' import 'dart:async'; class A { @@ -32,7 +32,7 @@ class A { } test_hasInitializer() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A { static int v = 0; } @@ -40,7 +40,7 @@ class A { } test_noInitializer() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A { static int x = 0, y, z = 2; } @@ -51,7 +51,7 @@ class A { } test_nullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A { static int? v; } @@ -59,7 +59,7 @@ class A { } test_type_dynamic() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A { static dynamic v; } @@ -67,7 +67,7 @@ class A { } test_type_dynamic_implicit() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A { static var v; } @@ -75,7 +75,7 @@ class A { } test_type_never() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A { static Never v; } @@ -86,7 +86,7 @@ class A { } test_type_void() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A { static void v; } diff --git a/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_top_level_variable_test.dart b/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_top_level_variable_test.dart index 218e4ef8adb7..33907f6ac4b1 100644 --- a/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_top_level_variable_test.dart +++ b/pkg/analyzer/test/src/diagnostics/not_initialized_non_nullable_top_level_variable_test.dart @@ -23,7 +23,7 @@ class NotInitializedNonNullableTopLevelVariableTest AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable]; test_futureOr_questionArgument_none() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' import 'dart:async'; FutureOr v; @@ -31,13 +31,13 @@ FutureOr v; } test_hasInitializer() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' int v = 0; '''); } test_noInitializer() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' int x = 0, y, z = 2; ''', [ error( @@ -48,25 +48,25 @@ int x = 0, y, z = 2; } test_nullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' int? v; '''); } test_type_dynamic() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' dynamic v; '''); } test_type_dynamic_implicit() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' var v; '''); } test_type_never() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' Never v; ''', [ error( @@ -77,7 +77,7 @@ Never v; } test_type_void() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' void v; '''); } diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_catch_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_catch_clause_test.dart index 3948d3565616..9253675ba633 100644 --- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_catch_clause_test.dart +++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_catch_clause_test.dart @@ -22,7 +22,7 @@ class NullableTypeInCatchClauseTest extends DriverResolutionTest { AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable]; test_noOnClause() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' f() { try { } catch (e) { @@ -32,7 +32,7 @@ f() { } test_on_class_nonNullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A {} f() { try { @@ -43,7 +43,7 @@ f() { } test_on_class_nullable() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A {} f() { try { @@ -56,7 +56,7 @@ f() { } test_on_typeParameter() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A { m() { try { @@ -70,7 +70,7 @@ class A { } test_on_typeParameter_nonNullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A { m() { try { diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart index b2f454baae9a..cd601a320adf 100644 --- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart +++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart @@ -22,14 +22,14 @@ class NullableTypeInExtendsClauseTest extends DriverResolutionTest { AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable]; test_class_nonNullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A {} class B extends A {} '''); } test_class_nullable() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A {} class B extends A? {} ''', [ @@ -38,7 +38,7 @@ class B extends A? {} } test_classAlias_withClass_nonNullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A {} class B {} class C = A with B; @@ -46,7 +46,7 @@ class C = A with B; } test_classAlias_withClass_nullable() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A {} class B {} class C = A? with B; @@ -56,7 +56,7 @@ class C = A? with B; } test_classAlias_withMixin_nonNullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A {} mixin B {} class C = A with B; @@ -64,7 +64,7 @@ class C = A with B; } test_classAlias_withMixin_nullable() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A {} mixin B {} class C = A? with B; diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart index 39ffb8e10b71..6eb1e9f9d405 100644 --- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart +++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart @@ -22,14 +22,14 @@ class NullableTypeInImplementsClauseTest extends DriverResolutionTest { AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable]; test_class_nonNullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A {} class B implements A {} '''); } test_class_nullable() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A {} class B implements A? {} ''', [ @@ -38,14 +38,14 @@ class B implements A? {} } test_mixin_nonNullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A {} mixin B implements A {} '''); } test_mixin_nullable() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A {} mixin B implements A? {} ''', [ diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart index 60e319ab253a..1e8706d1ea98 100644 --- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart +++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart @@ -22,14 +22,14 @@ class NullableTypeInOnClauseTest extends DriverResolutionTest { AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable]; test_nonNullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A {} mixin B on A {} '''); } test_nullable() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A {} mixin B on A? {} ''', [ diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart index c05909c40a2b..d39ed264ac1e 100644 --- a/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart +++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart @@ -22,14 +22,14 @@ class NullableTypeInWithClauseTest extends DriverResolutionTest { AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable]; test_class_nonNullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A {} class B with A {} '''); } test_class_nullable() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A {} class B with A? {} ''', [ @@ -38,7 +38,7 @@ class B with A? {} } test_classAlias_withClass_nonNullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A {} class B {} class C = A with B; @@ -46,7 +46,7 @@ class C = A with B; } test_classAlias_withClass_nullable() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A {} class B {} class C = A with B?; @@ -56,7 +56,7 @@ class C = A with B?; } test_classAlias_withMixin_nonNullable() async { - assertNoErrorsInCode(''' + await assertNoErrorsInCode(''' class A {} mixin B {} class C = A with B; @@ -64,7 +64,7 @@ class C = A with B; } test_classAlias_withMixin_nullable() async { - assertErrorsInCode(''' + await assertErrorsInCode(''' class A {} mixin B {} class C = A with B?; diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart index a7a5c1a813c0..18e5f55740b7 100644 --- a/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart +++ b/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart @@ -59,7 +59,7 @@ class B { test_generics() async { // dartbug.com/18953 - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'dart:async'; Future f() => new Future.value(0); void g(bool c) { diff --git a/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart b/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart index 99b749b41d25..8d0315047c78 100644 --- a/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart +++ b/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart @@ -20,7 +20,7 @@ class UnusedShownNameTest extends DriverResolutionTest { class A {} class B {} '''); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'lib1.dart' show A, B; A a; ''', [ @@ -33,7 +33,7 @@ A a; class A {} class B {} '''); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'lib1.dart' as p show A, B; p.A a; ''', [ @@ -48,7 +48,7 @@ class B {} class C {} class D {} '''); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'lib1.dart' show A, B; import 'lib1.dart' show C, D; A a; @@ -66,7 +66,7 @@ const int var2 = 2; const int var3 = 3; const int var4 = 4; '''); - assertErrorsInCode(r''' + await assertErrorsInCode(r''' import 'lib1.dart' show var1, var2; import 'lib1.dart' show var3, var4; int a = var1;