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

Unified Diff: pkg/front_end/test/scanner_fasta_test.dart

Issue 2694433002: Stop testing scanner error lengths. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | pkg/front_end/test/scanner_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/scanner_fasta_test.dart
diff --git a/pkg/front_end/test/scanner_fasta_test.dart b/pkg/front_end/test/scanner_fasta_test.dart
index a359e02684c6acc7bba767a65318f87f92b3af74..5e715673e6be3440a02bd7e5c5781d08ff5e6c05 100644
--- a/pkg/front_end/test/scanner_fasta_test.dart
+++ b/pkg/front_end/test/scanner_fasta_test.dart
@@ -224,7 +224,6 @@ class ScannerTest_Fasta extends ScannerTestBase {
// TODO(paulberry,ahe): why is endOffset sometimes null?
int endOffset = token.endOffset ?? charOffset;
TestError _makeError(ScannerErrorCode errorCode, List<Object> arguments) {
- int errorLength = endOffset - charOffset;
if (charOffset == inputLength) {
// Analyzer never generates an error message past the end of the input,
// since such an error would not be visible in an editor.
@@ -232,14 +231,7 @@ class ScannerTest_Fasta extends ScannerTestBase {
// in fasta, or move it elsewhere in analyzer?
charOffset--;
}
- if (errorLength == 0) {
- // Analyzer never generates an error message of length zero,
- // since such an error would not be visible in an editor.
- // TODO(paulberry,ahe): would it make sense to replicate this behavior
- // in fasta, or move it elsewhere in analyzer?
- errorLength = 1;
- }
- return new TestError(charOffset, errorLength, errorCode, arguments);
+ return new TestError(charOffset, errorCode, arguments);
}
var errorCode = token.errorCode;
« no previous file with comments | « no previous file | pkg/front_end/test/scanner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698