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

Unified Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 3004843002: Move one test to run under Fasta, sort files (Closed)
Patch Set: Created 3 years, 4 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 | « pkg/analyzer/test/generated/parser_fasta_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/parser_test.dart
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 2cf8fc0e8695775fe7c36d86ede8f0f2446a2513..2cb7d2f302364cba71d000909f410dcfdb9a0c71 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -1297,6 +1297,13 @@ void Function<A>(core.List<core.int> x) m() => null;
expect(assertInitializer.message, isNull);
}
+ void test_parseConstructor_factory_const_external() {
+ createParser('external const factory C();');
+ ClassMember member = parser.parseClassMember('C');
+ expectNotNullIfNoErrors(member);
+ listener.assertNoErrors();
+ }
+
void test_parseConstructor_factory_named() {
createParser('factory C.foo() => null;');
var constructor = parser.parseClassMember('C') as ConstructorDeclaration;
@@ -2658,6 +2665,20 @@ class Foo {
expect(clazz.name.name, 'A');
}
+ void test_expectedToken_semicolonMissingAfterExpression() {
+ parseStatement("x");
+ assertErrorsWithCodes([ParserErrorCode.EXPECTED_TOKEN]);
+ }
+
+ void test_expectedToken_semicolonMissingAfterImport() {
+ CompilationUnit unit = parseCompilationUnit(
+ "import '' class A {}", [ParserErrorCode.EXPECTED_TOKEN]);
+ ImportDirective directive = unit.directives[0] as ImportDirective;
+ Token semicolon = directive.semicolon;
+ expect(semicolon, isNotNull);
+ expect(semicolon.isSynthetic, isTrue);
+ }
+
void test_expectedToken_uriAndSemicolonMissingAfterExport() {
CompilationUnit unit = parseCompilationUnit("export class A {}", [
ParserErrorCode.EXPECTED_STRING_LITERAL,
@@ -2675,20 +2696,6 @@ class Foo {
expect(clazz.name.name, 'A');
}
- void test_expectedToken_semicolonMissingAfterExpression() {
- parseStatement("x");
- assertErrorsWithCodes([ParserErrorCode.EXPECTED_TOKEN]);
- }
-
- void test_expectedToken_semicolonMissingAfterImport() {
- CompilationUnit unit = parseCompilationUnit(
- "import '' class A {}", [ParserErrorCode.EXPECTED_TOKEN]);
- ImportDirective directive = unit.directives[0] as ImportDirective;
- Token semicolon = directive.semicolon;
- expect(semicolon, isNotNull);
- expect(semicolon.isSynthetic, isTrue);
- }
-
void test_expectedToken_whileMissingInDoStatement() {
parseStatement("do {} (x);");
assertErrorsWithCodes([ParserErrorCode.EXPECTED_TOKEN]);
@@ -8277,13 +8284,6 @@ abstract class FormalParameterParserTestMixin
@reflectiveTest
class NonErrorParserTest extends ParserTestCase {
- void test_constFactory_external() {
- createParser('external const factory C();');
- ClassMember member = parser.parseClassMember('C');
- expectNotNullIfNoErrors(member);
- listener.assertNoErrors();
- }
-
void test_staticMethod_notParsingFunctionBodies() {
ParserTestCase.parseFunctionBodies = false;
try {
« no previous file with comments | « pkg/analyzer/test/generated/parser_fasta_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698