Index: pkg/analyzer/test/src/task/dart_test.dart |
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart |
index cddc662196cf276b146790d58a844fa4f802c13b..6bdaf323a66269c7bc619fac590a2a629be2efad 100644 |
--- a/pkg/analyzer/test/src/task/dart_test.dart |
+++ b/pkg/analyzer/test/src/task/dart_test.dart |
@@ -4464,18 +4464,35 @@ main(p1, p2, p3, p4) { |
@reflectiveTest |
class ScanDartTaskTest extends _AbstractDartTaskTest { |
+ test_ignore_info() { |
+ _performScanTask(''' |
+//ignore: error_code |
+var x = ''; |
+foo(); // ignore: error_code_2 |
+bar(); //ignore: error_code, error_code_2 |
+'''); |
+ |
+ IgnoreInfo info = outputs[IGNORE_INFO]; |
+ expect(info.ignores.keys, hasLength(3)); |
+ expect(info.ignores[1].first, 'error_code'); |
+ expect(info.ignores[3].first, 'error_code_2'); |
+ expect(info.ignores[4], unorderedEquals(['error_code', 'error_code_2'])); |
+ } |
+ |
test_perform_errors() { |
_performScanTask('import "'); |
- expect(outputs, hasLength(3)); |
+ expect(outputs, hasLength(4)); |
expect(outputs[LINE_INFO], isNotNull); |
+ expect(outputs[IGNORE_INFO], isNotNull); |
scheglov
2016/05/27 18:05:47
Would be nice to test the computed IgnoreInfo here
Brian Wilkerson
2016/05/27 18:21:18
If the method in the task gets moved to the class,
pquitslund
2016/05/27 21:50:53
Done.
|
expect(outputs[SCAN_ERRORS], hasLength(1)); |
expect(outputs[TOKEN_STREAM], isNotNull); |
} |
test_perform_noErrors() { |
_performScanTask('class A {}'); |
- expect(outputs, hasLength(3)); |
+ expect(outputs, hasLength(4)); |
expect(outputs[LINE_INFO], isNotNull); |
+ expect(outputs[IGNORE_INFO], isNotNull); |
expect(outputs[SCAN_ERRORS], hasLength(0)); |
expect(outputs[TOKEN_STREAM], isNotNull); |
} |