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

Unified Diff: tests/compiler/dart2js/parser_test.dart

Issue 14969024: Fix parser in case of unmatched angle bracket. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Re-upload Created 7 years, 7 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 | « sdk/lib/_internal/compiler/implementation/scanner/parser.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/parser_test.dart
diff --git a/tests/compiler/dart2js/parser_test.dart b/tests/compiler/dart2js/parser_test.dart
index d70fcb44ee661588a32dd6292c2e2455fc8a93ae..5cc7f558cfa9aca7de4b0e64664b77839986fb28 100644
--- a/tests/compiler/dart2js/parser_test.dart
+++ b/tests/compiler/dart2js/parser_test.dart
@@ -306,6 +306,18 @@ void testMissingCloseBraceInClass() {
Expect.throws(parse, check);
}
+void testUnmatchedAngleBracket() {
+ final String source = 'A<'; // unmatched '<'
+ parse() {
+ fullParseUnit(source, diagnosticHandler: new Collector());
+ }
+ check(Collector c) {
+ Expect.equals(LT_TOKEN, c.token);
+ return true;
+ }
+ Expect.throws(parse, check);
+}
+
void main() {
testGenericTypes();
// TODO(ahe): Enable this test when we handle library prefixes.
@@ -322,4 +334,5 @@ void main() {
testOperatorParse();
testMissingCloseParen();
testMissingCloseBraceInClass();
+ testUnmatchedAngleBracket();
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/scanner/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698