mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:09:49 +00:00
Update parser recovery tests
Change-Id: Iab3523b61e878844e7e8ee296a7c4da289758028 Reviewed-on: https://dart-review.googlesource.com/51860 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Dan Rubel <danrubel@google.com>
This commit is contained in:
parent
2eeea7bc30
commit
58dc646c85
|
@ -35,7 +35,7 @@ class DoStatementTest extends PartialCodeTest {
|
|||
'leftBrace',
|
||||
'do {',
|
||||
[
|
||||
ParserErrorCode.EXPECTED_TOKEN,
|
||||
ScannerErrorCode.EXPECTED_TOKEN,
|
||||
ParserErrorCode.EXPECTED_TOKEN,
|
||||
ParserErrorCode.EXPECTED_TOKEN,
|
||||
ParserErrorCode.MISSING_IDENTIFIER,
|
||||
|
@ -43,7 +43,7 @@ class DoStatementTest extends PartialCodeTest {
|
|||
ParserErrorCode.EXPECTED_TOKEN
|
||||
],
|
||||
"do {} while (_s_);",
|
||||
allFailing: true),
|
||||
failing: allExceptEof),
|
||||
new TestDescriptor(
|
||||
'rightBrace',
|
||||
'do {}',
|
||||
|
|
|
@ -32,9 +32,13 @@ class ExportDirectivesTest extends PartialCodeTest {
|
|||
new TestDescriptor(
|
||||
'keyword',
|
||||
'export',
|
||||
[/*ParserErrorCode.MISSING_URI,*/ ParserErrorCode.EXPECTED_TOKEN],
|
||||
"export '';",
|
||||
allFailing: true),
|
||||
[
|
||||
// TODO(danrubel): Consider an improved error message
|
||||
// ParserErrorCode.MISSING_URI,
|
||||
ParserErrorCode.EXPECTED_STRING_LITERAL,
|
||||
ParserErrorCode.EXPECTED_TOKEN
|
||||
],
|
||||
"export '';"),
|
||||
new TestDescriptor('emptyUri', "export ''",
|
||||
[ParserErrorCode.EXPECTED_TOKEN], "export '';"),
|
||||
new TestDescriptor('uri', "export 'a.dart'",
|
||||
|
|
|
@ -20,9 +20,13 @@ class ImportDirectivesTest extends PartialCodeTest {
|
|||
new TestDescriptor(
|
||||
'keyword',
|
||||
'import',
|
||||
[/*ParserErrorCode.MISSING_URI,*/ ParserErrorCode.EXPECTED_TOKEN],
|
||||
"import '';",
|
||||
allFailing: true),
|
||||
[
|
||||
// TODO(danrubel): Consider an improved error message
|
||||
// ParserErrorCode.MISSING_URI,
|
||||
ParserErrorCode.EXPECTED_STRING_LITERAL,
|
||||
ParserErrorCode.EXPECTED_TOKEN
|
||||
],
|
||||
"import '';"),
|
||||
new TestDescriptor('emptyUri', "import ''",
|
||||
[ParserErrorCode.EXPECTED_TOKEN], "import '';"),
|
||||
new TestDescriptor('fullUri', "import 'a.dart'",
|
||||
|
|
|
@ -18,9 +18,13 @@ class PartDirectivesTest extends PartialCodeTest {
|
|||
new TestDescriptor(
|
||||
'keyword',
|
||||
'part',
|
||||
[/*ParserErrorCode.MISSING_URI,*/ ParserErrorCode.EXPECTED_TOKEN],
|
||||
"part '';",
|
||||
allFailing: true),
|
||||
[
|
||||
// TODO(danrubel): Consider an improved error message
|
||||
// ParserErrorCode.MISSING_URI,
|
||||
ParserErrorCode.EXPECTED_STRING_LITERAL,
|
||||
ParserErrorCode.EXPECTED_TOKEN
|
||||
],
|
||||
"part '';"),
|
||||
new TestDescriptor('emptyUri', "part ''",
|
||||
[ParserErrorCode.EXPECTED_TOKEN], "part '';"),
|
||||
new TestDescriptor('uri', "part 'a.dart'",
|
||||
|
|
Loading…
Reference in a new issue