File tree 1 file changed +43
-0
lines changed
pkg/analysis_server/test/src/computer
1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -519,6 +519,49 @@ main2/*[1*/() {
519
519
});
520
520
}
521
521
522
+ Future <void > test_function_expression_underscore_preWildcards () async {
523
+ var content = '''
524
+ // /*[0*/
525
+ // @dart = 3.4
526
+ // (pre wildcard-variables)/*0]*/
527
+
528
+ // Content before
529
+
530
+ void f/*[1*/() {
531
+ _/*[2*/(){
532
+ }/*2]*/
533
+ }/*1]*/
534
+
535
+ // Content after
536
+ ''' ;
537
+
538
+ await _computeRegions (content);
539
+ expectRegions ({
540
+ 0 : FoldingKind .FILE_HEADER ,
541
+ 1 : FoldingKind .FUNCTION_BODY ,
542
+ 2 : FoldingKind .FUNCTION_BODY ,
543
+ });
544
+ }
545
+
546
+ Future <void > test_function_expression_wildcard () async {
547
+ var content = '''
548
+ // Content before
549
+
550
+ void f/*[0*/() {
551
+ _/*[1*/(){
552
+ }/*1]*/
553
+ }/*0]*/
554
+
555
+ // Content after
556
+ ''' ;
557
+
558
+ await _computeRegions (content);
559
+ expectRegions ({
560
+ 0 : FoldingKind .FUNCTION_BODY ,
561
+ 1 : FoldingKind .FUNCTION_BODY ,
562
+ });
563
+ }
564
+
522
565
Future <void > test_function_with_dart_doc () async {
523
566
var content = '''
524
567
// Content before
You can’t perform that action at this time.
0 commit comments