| Index: pkg/analyzer/test/generated/error_suppression_test.dart
|
| diff --git a/pkg/analyzer/test/generated/error_suppression_test.dart b/pkg/analyzer/test/generated/error_suppression_test.dart
|
| index ea0b35f6dbe8e264ee72424d60b82409ea71015a..53a13c2aaa6fee03f4e17111a8a19388aae54901 100644
|
| --- a/pkg/analyzer/test/generated/error_suppression_test.dart
|
| +++ b/pkg/analyzer/test/generated/error_suppression_test.dart
|
| @@ -17,163 +17,163 @@ main() {
|
|
|
| @reflectiveTest
|
| class ErrorSuppressionTest extends ResolverTestCase {
|
| - void test_error_code_mismatch() {
|
| + test_error_code_mismatch() async {
|
| Source source = addSource('''
|
| // ignore: const_initialized_with_non_constant_value
|
| int x = '';
|
| const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source, [
|
| + await assertErrors(source, [
|
| StaticTypeWarningCode.INVALID_ASSIGNMENT,
|
| CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ]);
|
| }
|
|
|
| - void test_ignore_first() {
|
| + test_ignore_first() async {
|
| Source source = addSource('''
|
| // ignore: invalid_assignment
|
| int x = '';
|
| // ... but no ignore here ...
|
| const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source,
|
| + await assertErrors(source,
|
| [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
|
| }
|
|
|
| - void test_ignore_first_trailing() {
|
| + test_ignore_first_trailing() async {
|
| Source source = addSource('''
|
| int x = ''; // ignore: invalid_assignment
|
| // ... but no ignore here ...
|
| const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source,
|
| + await assertErrors(source,
|
| [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
|
| }
|
|
|
| - void test_ignore_only_trailing() {
|
| + test_ignore_only_trailing() async {
|
| Source source = addSource('''
|
| int x = ''; // ignore: invalid_assignment
|
| ''');
|
| - assertErrors(source, []);
|
| + await assertErrors(source, []);
|
| }
|
|
|
| - void test_ignore_second() {
|
| + test_ignore_second() async {
|
| Source source = addSource('''
|
| //INVALID_ASSIGNMENT
|
| int x = '';
|
| // ignore: const_initialized_with_non_constant_value
|
| const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
|
| + await assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
|
| }
|
|
|
| - void test_ignore_second_trailing() {
|
| + test_ignore_second_trailing() async {
|
| Source source = addSource('''
|
| //INVALID_ASSIGNMENT
|
| int x = '';
|
| const y = x; // ignore: const_initialized_with_non_constant_value
|
| ''');
|
| - assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
|
| + await assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
|
| }
|
|
|
| - void test_ignore_upper_case() {
|
| + test_ignore_upper_case() async {
|
| Source source = addSource('''
|
| int x = ''; // ignore: INVALID_ASSIGNMENT
|
| ''');
|
| - assertErrors(source, []);
|
| + await assertErrors(source, []);
|
| }
|
|
|
| - void test_invalid_error_code() {
|
| + test_invalid_error_code() async {
|
| Source source = addSource('''
|
| // ignore: right_format_wrong_code
|
| int x = '';
|
| const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source, [
|
| + await assertErrors(source, [
|
| StaticTypeWarningCode.INVALID_ASSIGNMENT,
|
| CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ]);
|
| }
|
|
|
| - void test_missing_error_codes() {
|
| + test_missing_error_codes() async {
|
| Source source = addSource('''
|
| int x = 3;
|
| // ignore:
|
| const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source, [
|
| + await assertErrors(source, [
|
| StaticTypeWarningCode.INVALID_ASSIGNMENT,
|
| CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ]);
|
| }
|
|
|
| - void test_missing_metadata_suffix() {
|
| + test_missing_metadata_suffix() async {
|
| Source source = addSource('''
|
| // ignore invalid_assignment
|
| String y = 3; //INVALID_ASSIGNMENT
|
| ''');
|
| - assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
|
| + await assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
|
| }
|
|
|
| - void test_multiple_comments() {
|
| + test_multiple_comments() async {
|
| Source source = addSource('''
|
| int x = ''; //This is the first comment...
|
| // ignore: const_initialized_with_non_constant_value
|
| const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
|
| + await assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
|
| }
|
|
|
| - void test_multiple_ignores() {
|
| + test_multiple_ignores() async {
|
| Source source = addSource('''
|
| int x = 3;
|
| // ignore: invalid_assignment, const_initialized_with_non_constant_value
|
| const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source, []);
|
| + await assertErrors(source, []);
|
| }
|
|
|
| - void test_multiple_ignores_traling() {
|
| + test_multiple_ignores_traling() async {
|
| Source source = addSource('''
|
| int x = 3;
|
| const String y = x; // ignore: invalid_assignment, const_initialized_with_non_constant_value
|
| ''');
|
| - assertErrors(source, []);
|
| + await assertErrors(source, []);
|
| }
|
|
|
| - void test_multiple_ignores_whitespace_variant_1() {
|
| + test_multiple_ignores_whitespace_variant_1() async {
|
| Source source = addSource('''
|
| int x = 3;
|
| //ignore:invalid_assignment,const_initialized_with_non_constant_value
|
| const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source, []);
|
| + await assertErrors(source, []);
|
| }
|
|
|
| - void test_multiple_ignores_whitespace_variant_2() {
|
| + test_multiple_ignores_whitespace_variant_2() async {
|
| Source source = addSource('''
|
| int x = 3;
|
| //ignore: invalid_assignment,const_initialized_with_non_constant_value
|
| const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source, []);
|
| + await assertErrors(source, []);
|
| }
|
|
|
| - void test_multiple_ignores_whitespace_variant_3() {
|
| + test_multiple_ignores_whitespace_variant_3() async {
|
| Source source = addSource('''
|
| int x = 3;
|
| // ignore: invalid_assignment,const_initialized_with_non_constant_value
|
| const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source, []);
|
| + await assertErrors(source, []);
|
| }
|
|
|
| - void test_no_ignores() {
|
| + test_no_ignores() async {
|
| Source source = addSource('''
|
| int x = ''; //INVALID_ASSIGNMENT
|
| const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ''');
|
| - assertErrors(source, [
|
| + await assertErrors(source, [
|
| StaticTypeWarningCode.INVALID_ASSIGNMENT,
|
| CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
|
| ]);
|
|
|