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

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

Issue 2996673002: translate missing ">" fasta error code to analyzer error (Closed)
Patch Set: address comments Created 3 years, 4 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
« no previous file with comments | « no previous file | pkg/front_end/lib/src/scanner/errors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/scanner_test.dart
diff --git a/pkg/analyzer/test/generated/scanner_test.dart b/pkg/analyzer/test/generated/scanner_test.dart
index 76d0fd287f41332d390c7e7331ecf3c0dadc596b..0a53f95aa51b7d6b7d510ea81a87e5dab59ed43c 100644
--- a/pkg/analyzer/test/generated/scanner_test.dart
+++ b/pkg/analyzer/test/generated/scanner_test.dart
@@ -79,6 +79,19 @@ class CharacterRangeReaderTest extends EngineTestCase {
@reflectiveTest
class LineInfoTest extends EngineTestCase {
+ void test_translate_missing_closing_gt_error() {
+ // Ensure that the UnmatchedToken error for missing '>' is translated
+ // to the correct analyzer error code.
+ // See https://github.com/dart-lang/sdk/issues/30320
+ String source = '<!-- @Component(';
+ GatheringErrorListener listener = new GatheringErrorListener();
+ _scanWithListener(source, listener);
+ listener.assertErrorsWithCodes(const [
+ ScannerErrorCode.EXPECTED_TOKEN,
+ ScannerErrorCode.EXPECTED_TOKEN,
+ ]);
+ }
+
void test_lineInfo_multilineComment() {
String source = "/*\r\n *\r\n */";
_assertLineInfo(source, [
« no previous file with comments | « no previous file | pkg/front_end/lib/src/scanner/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698