Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: pkg/analyzer/test/generated/error_suppression_test.dart

Issue 1738203002: Prettify ignore syntax (#25685). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« pkg/analyzer/lib/src/task/dart.dart ('K') | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 560a2c25ba20541cf8436bec0178b413239508b1..da6c49d8e8a9fb17406c285a4d528d3d67dc5e4e 100644
--- a/pkg/analyzer/test/generated/error_suppression_test.dart
+++ b/pkg/analyzer/test/generated/error_suppression_test.dart
@@ -19,7 +19,7 @@ main() {
class ErrorSuppressionTest extends ResolverTestCase {
void test_error_code_mismatch() {
Source source = addSource('''
-//# ignore: const_initialized_with_non_constant_value
+// ignore: const_initialized_with_non_constant_value
int x = '';
const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
''');
@@ -32,7 +32,7 @@ const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
void test_ignore_first() {
Source source = addSource('''
-//# ignore: invalid_assignment
+// ignore: invalid_assignment
int x = '';
// ... but no ignore here ...
const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
@@ -46,7 +46,7 @@ const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
Source source = addSource('''
//INVALID_ASSIGNMENT
int x = '';
-//# ignore: const_initialized_with_non_constant_value
+// ignore: const_initialized_with_non_constant_value
const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
''');
computeLibrarySourceErrors(source);
@@ -55,7 +55,7 @@ const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
void test_invalid_error_code() {
Source source = addSource('''
-//# ignore: right_format_wrong_code
+// ignore: right_format_wrong_code
int x = '';
const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
''');
@@ -69,7 +69,7 @@ const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
void test_missing_error_codes() {
Source source = addSource('''
int x = 3;
-//# ignore:
+// ignore:
const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
''');
computeLibrarySourceErrors(source);
@@ -79,9 +79,9 @@ const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VA
]);
}
- void test_missing_metadata_prefix() {
+ void test_missing_metadata_suffix() {
Source source = addSource('''
-// ignore: invalid_assignment
+// ignore invalid_assignment
String y = 3; //INVALID_ASSIGNMENT
''');
computeLibrarySourceErrors(source);
@@ -91,7 +91,7 @@ String y = 3; //INVALID_ASSIGNMENT
void test_multiple_comments() {
Source source = addSource('''
int x = ''; //This is the first comment...
-//# ignore: const_initialized_with_non_constant_value
+// ignore: const_initialized_with_non_constant_value
const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
''');
computeLibrarySourceErrors(source);
@@ -101,7 +101,7 @@ const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
void test_multiple_ignores() {
Source source = addSource('''
int x = 3;
-//# ignore: invalid_assignment, const_initialized_with_non_constant_value
+// ignore: invalid_assignment, const_initialized_with_non_constant_value
const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
''');
computeLibrarySourceErrors(source);
@@ -111,7 +111,7 @@ const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VA
void test_multiple_ignores_whitespace_variant_1() {
Source source = addSource('''
int x = 3;
-//#ignore:invalid_assignment,const_initialized_with_non_constant_value
+//ignore:invalid_assignment,const_initialized_with_non_constant_value
const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
''');
computeLibrarySourceErrors(source);
@@ -121,7 +121,7 @@ const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VA
void test_multiple_ignores_whitespace_variant_2() {
Source source = addSource('''
int x = 3;
-//#ignore: invalid_assignment,const_initialized_with_non_constant_value
+//ignore: invalid_assignment,const_initialized_with_non_constant_value
const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
''');
computeLibrarySourceErrors(source);
@@ -131,7 +131,7 @@ const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VA
void test_multiple_ignores_whitespace_variant_3() {
Source source = addSource('''
int x = 3;
-//# ignore: invalid_assignment,const_initialized_with_non_constant_value
+// ignore: invalid_assignment,const_initialized_with_non_constant_value
const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
''');
computeLibrarySourceErrors(source);
« pkg/analyzer/lib/src/task/dart.dart ('K') | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698