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(); |
} |