Skip to content

Commit

Permalink
Patterns parsing: fix the name of one more test.
Browse files Browse the repository at this point in the history
Change-Id: I106f3eaed7cc15badb8594188f272778a1036bbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262560
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Paul Berry <[email protected]>
  • Loading branch information
stereotype441 authored and Commit Queue committed Oct 5, 2022
1 parent 6136a0d commit afa257f
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions pkg/analyzer/test/generated/patterns_parser_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2186,34 +2186,6 @@ f() {
]);
}

test_extractor_pattern_with_type_args() {
_parse('''
class C<T> {}
void f(x) {
switch (x) {
case C<int>():
break;
}
}
''');
var node = findNode.switchPatternCase('case').pattern;
assertParsedNodeText(node, r'''
ExtractorPattern
type: NamedType
name: SimpleIdentifier
token: C
typeArguments: TypeArgumentList
leftBracket: <
arguments
NamedType
name: SimpleIdentifier
token: int
rightBracket: >
leftParenthesis: (
rightParenthesis: )
''');
}

test_extractor_prefixed_withTypeArgs_insideCase() {
_parse('''
import 'dart:async' as async;
Expand Down Expand Up @@ -2464,6 +2436,34 @@ PostfixPattern
''');
}

test_extractor_unprefixed_withTypeArgs_insideCase() {
_parse('''
class C<T> {}
void f(x) {
switch (x) {
case C<int>():
break;
}
}
''');
var node = findNode.switchPatternCase('case').pattern;
assertParsedNodeText(node, r'''
ExtractorPattern
type: NamedType
name: SimpleIdentifier
token: C
typeArguments: TypeArgumentList
leftBracket: <
arguments
NamedType
name: SimpleIdentifier
token: int
rightBracket: >
leftParenthesis: (
rightParenthesis: )
''');
}

test_extractor_unprefixed_withTypeArgs_insideNullAssert() {
_parse('''
class C<T> {
Expand Down

0 comments on commit afa257f

Please sign in to comment.