Chromium Code Reviews| 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 9ea09a084c9d3b9dd63e0f9b0857b9aece2894c4..fdd8fb54afd5177a707d8066d471f443e918bd52 100644 |
| --- a/pkg/analyzer/test/src/task/dart_test.dart |
| +++ b/pkg/analyzer/test/src/task/dart_test.dart |
| @@ -27,6 +27,7 @@ import 'package:analyzer/src/task/strong/ast_properties.dart' as strong_ast; |
| import 'package:analyzer/task/dart.dart'; |
| import 'package:analyzer/task/general.dart'; |
| import 'package:analyzer/task/model.dart'; |
| +import 'package:front_end/src/scanner/scanner.dart' as fe; |
| import 'package:test/test.dart'; |
| import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| @@ -3261,7 +3262,12 @@ class A {'''); |
| _assertHasCore(outputs[IMPORTED_LIBRARIES], 2); |
| expect(outputs[INCLUDED_PARTS], hasLength(1)); |
| expect(outputs[LIBRARY_SPECIFIC_UNITS], hasLength(2)); |
| - expect(outputs[PARSE_ERRORS], hasLength(1)); |
| + if (fe.Scanner.useFasta) { |
| + // Missing closing brace error is reported by the Fasta scanner. |
| + expect(outputs[PARSE_ERRORS], hasLength(0)); |
|
Brian Wilkerson
2017/06/14 04:17:24
Can we check for scanner errors here?
danrubel
2017/06/14 06:28:58
Done. Just added a corresponding scan test to veri
|
| + } else { |
| + expect(outputs[PARSE_ERRORS], hasLength(1)); |
| + } |
| expect(outputs[PARSED_UNIT], isNotNull); |
| expect(outputs[REFERENCED_SOURCES], hasLength(5)); |
| expect(outputs[SOURCE_KIND], SourceKind.LIBRARY); |
| @@ -4418,7 +4424,12 @@ bar(); //ignore: error_code, error_code_2 |
| computeResult(script, TOKEN_STREAM, matcher: isScanDartTask); |
| expect(outputs[LINE_INFO], isNotNull); |
| - expect(outputs[SCAN_ERRORS], isEmpty); |
| + if (fe.Scanner.useFasta) { |
| + // Missing closing brace error is reported by Fasta scanner. |
| + expect(outputs[SCAN_ERRORS], hasLength(1)); |
| + } else { |
| + expect(outputs[SCAN_ERRORS], isEmpty); |
| + } |
| Token tokenStream = outputs[TOKEN_STREAM]; |
| expect(tokenStream, isNotNull); |
| expect(tokenStream.lexeme, 'void'); |