| Index: pkg/analyzer/test/generated/parser_fasta_test.dart
|
| diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
|
| index 7bce960a181b40d72f29e72a1b05f7764e6a1e75..bf0c9ba62e9f84b7401619c9f96224efa4b105dd 100644
|
| --- a/pkg/analyzer/test/generated/parser_fasta_test.dart
|
| +++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
|
| @@ -197,6 +197,9 @@ class ErrorParserTest_Fasta extends FastaParserTestCase
|
| // TODO(brianwilkerson) Wrong errors:
|
| // Expected 1 errors of type ParserErrorCode.CONST_CLASS, found 0;
|
| // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 2 (1, 7)
|
| +
|
| + // TODO(danrubel): Rather than reporting ParserErrorCode.EXTRANEOUS_MODIFIER
|
| + // report ParserErrorCode.CONST_CLASS to better help the user
|
| super.test_constClass();
|
| }
|
|
|
| @@ -208,15 +211,6 @@ class ErrorParserTest_Fasta extends FastaParserTestCase
|
| super.test_constConstructorWithBody();
|
| }
|
|
|
| - @override
|
| - @failingTest
|
| - void test_constEnum() {
|
| - // TODO(brianwilkerson) Wrong errors:
|
| - // Expected 1 errors of type ParserErrorCode.CONST_ENUM, found 0;
|
| - // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 2 (1, 7)
|
| - super.test_constEnum();
|
| - }
|
| -
|
| @override
|
| @failingTest
|
| void test_constFactory() {
|
| @@ -250,15 +244,6 @@ class ErrorParserTest_Fasta extends FastaParserTestCase
|
| super.test_constructorWithReturnType_var();
|
| }
|
|
|
| - @override
|
| - @failingTest
|
| - void test_constTypedef() {
|
| - // TODO(brianwilkerson) Wrong errors:
|
| - // Expected 1 errors of type ParserErrorCode.CONST_TYPEDEF, found 0;
|
| - // 0 errors of type ParserErrorCode.EXTRANEOUS_MODIFIER, found 2 (1, 7)
|
| - super.test_constTypedef();
|
| - }
|
| -
|
| @override
|
| @failingTest
|
| void test_continueOutsideOfLoop_continueInIfStatement() {
|
| @@ -786,36 +771,18 @@ class ErrorParserTest_Fasta extends FastaParserTestCase
|
| super.test_finalAndVar();
|
| }
|
|
|
| - @override
|
| - @failingTest
|
| - void test_finalClass() {
|
| - super.test_finalClass();
|
| - }
|
| -
|
| @override
|
| @failingTest
|
| void test_finalConstructor() {
|
| super.test_finalConstructor();
|
| }
|
|
|
| - @override
|
| - @failingTest
|
| - void test_finalEnum() {
|
| - super.test_finalEnum();
|
| - }
|
| -
|
| @override
|
| @failingTest
|
| void test_finalMethod() {
|
| super.test_finalMethod();
|
| }
|
|
|
| - @override
|
| - @failingTest
|
| - void test_finalTypedef() {
|
| - super.test_finalTypedef();
|
| - }
|
| -
|
| @override
|
| @failingTest
|
| void test_functionTypedParameter_const() {
|
| @@ -1675,36 +1642,6 @@ class ErrorParserTest_Fasta extends FastaParserTestCase
|
| super.test_staticSetterWithoutBody();
|
| }
|
|
|
| - @override
|
| - @failingTest
|
| - void test_staticTopLevelDeclaration_class() {
|
| - super.test_staticTopLevelDeclaration_class();
|
| - }
|
| -
|
| - @override
|
| - @failingTest
|
| - void test_staticTopLevelDeclaration_enum() {
|
| - super.test_staticTopLevelDeclaration_enum();
|
| - }
|
| -
|
| - @override
|
| - @failingTest
|
| - void test_staticTopLevelDeclaration_function() {
|
| - super.test_staticTopLevelDeclaration_function();
|
| - }
|
| -
|
| - @override
|
| - @failingTest
|
| - void test_staticTopLevelDeclaration_typedef() {
|
| - super.test_staticTopLevelDeclaration_typedef();
|
| - }
|
| -
|
| - @override
|
| - @failingTest
|
| - void test_staticTopLevelDeclaration_variable() {
|
| - super.test_staticTopLevelDeclaration_variable();
|
| - }
|
| -
|
| @override
|
| @failingTest
|
| void test_string_unterminated_interpolation_block() {
|
| @@ -2515,7 +2452,13 @@ class FastaParserTestCase extends Object
|
| code == ParserErrorCode.ABSTRACT_ENUM ||
|
| code == ParserErrorCode.ABSTRACT_TOP_LEVEL_FUNCTION ||
|
| code == ParserErrorCode.ABSTRACT_TOP_LEVEL_VARIABLE ||
|
| - code == ParserErrorCode.ABSTRACT_TYPEDEF)
|
| + code == ParserErrorCode.ABSTRACT_TYPEDEF ||
|
| + code == ParserErrorCode.CONST_ENUM ||
|
| + code == ParserErrorCode.CONST_TYPEDEF ||
|
| + code == ParserErrorCode.FINAL_CLASS ||
|
| + code == ParserErrorCode.FINAL_ENUM ||
|
| + code == ParserErrorCode.FINAL_TYPEDEF ||
|
| + code == ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION)
|
| return ParserErrorCode.EXTRANEOUS_MODIFIER;
|
| return code;
|
| }).toList();
|
| @@ -4320,19 +4263,36 @@ class TopLevelParserTest_Fasta extends FastaParserTestCase
|
| }
|
|
|
| @override
|
| - @failingTest
|
| - void test_parseCompilationUnit_abstractAsPrefix_parameterized() {
|
| - // TODO(danrubel): built-in "abstract" cannot be used as a type
|
| - super.test_parseCompilationUnit_abstractAsPrefix_parameterized();
|
| - }
|
| -
|
| - @override
|
| - @failingTest
|
| void test_parseCompilationUnit_builtIn_asFunctionName() {
|
| + //super.test_parseCompilationUnit_builtIn_asFunctionName();
|
| +
|
| + // This is a subset of
|
| + // super.test_parseCompilationUnit_builtIn_asFunctionName
|
| + // that passes. The remainder are in the
|
| + // test_parseCompilationUnit_builtIn_asFunctionName2 method below
|
| + parseCompilationUnit('abstract(x) => 0;');
|
| + parseCompilationUnit('as(x) => 0;');
|
| + parseCompilationUnit('dynamic(x) => 0;');
|
| + parseCompilationUnit('external(x) => 0;');
|
| + parseCompilationUnit('factory(x) => 0;');
|
| + parseCompilationUnit('get(x) => 0;');
|
| + parseCompilationUnit('implements(x) => 0;');
|
| + parseCompilationUnit('operator(x) => 0;');
|
| + parseCompilationUnit('set(x) => 0;');
|
| + parseCompilationUnit('static(x) => 0;');
|
| + parseCompilationUnit('static(abstract) => 0;');
|
| + parseCompilationUnit('typedef(x) => 0;');
|
| + }
|
| +
|
| + @failingTest
|
| + void test_parseCompilationUnit_builtIn_asFunctionName2() {
|
| // TODO(paulberry,ahe): Fasta's parser is confused when one of the built-in
|
| // identifiers `export`, `import`, `library`, `part`, or `typedef` appears
|
| // as the name of a top level function with an implicit return type.
|
| - super.test_parseCompilationUnit_builtIn_asFunctionName();
|
| + parseCompilationUnit('export(x) => 0;');
|
| + parseCompilationUnit('import(x) => 0;');
|
| + parseCompilationUnit('library(x) => 0;');
|
| + parseCompilationUnit('part(x) => 0;');
|
| }
|
|
|
| @override
|
|
|