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

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

Issue 11348216: Report parser error if a class isn't terminated by }. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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 | « dart/tests/compiler/dart2js/parser_helper.dart ('k') | dart/tests/language/class_syntax_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/compiler/dart2js/parser_test.dart
diff --git a/dart/tests/compiler/dart2js/parser_test.dart b/dart/tests/compiler/dart2js/parser_test.dart
index 2bb1b49f1011159946eafcf56ff4edd40a50d41c..bb7817527c9de21372ab327159cfba44f4817a5e 100644
--- a/dart/tests/compiler/dart2js/parser_test.dart
+++ b/dart/tests/compiler/dart2js/parser_test.dart
@@ -293,6 +293,18 @@ void testMissingCloseParen() {
Expect.throws(parse, check);
}
+void testMissingCloseBraceInClass() {
+ final String source = 'class Foo {'; // Missing close '}'.
+ parse() {
+ fullParseUnit(source, diagnosticHandler: new Collector());
+ }
+ check(Collector c) {
+ Expect.equals(EOF_TOKEN, c.token);
+ return true;
+ }
+ Expect.throws(parse, check);
+}
+
void main() {
testGenericTypes();
// TODO(ahe): Enable this test when we handle library prefixes.
@@ -308,4 +320,5 @@ void main() {
testPostfix();
testOperatorParse();
testMissingCloseParen();
+ testMissingCloseBraceInClass();
}
« no previous file with comments | « dart/tests/compiler/dart2js/parser_helper.dart ('k') | dart/tests/language/class_syntax_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698