Skip to content

Commit

Permalink
Version 3.0.0-90.0.dev
Browse files Browse the repository at this point in the history
Merge 4bf325d into dev
  • Loading branch information
Dart CI committed Jan 5, 2023
2 parents 1734ce9 + 4bf325d commit 705cd58
Show file tree
Hide file tree
Showing 10 changed files with 224 additions and 225 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ class AnalysisNotificationClosingLabelsTest
Widget build(BuildContext context) {
return /*1*/new Row(
children: /*2*/<Widget>[
new Text('a'),
new Text('b'),
Text('a'),
Text('b'),
]/*/2*/,
)/*/1*/;
}
''';

static final expectedResults = [
ClosingLabel(51, 96, 'Row'),
ClosingLabel(79, 57, '<Widget>[]')
ClosingLabel(51, 88, 'Row'),
ClosingLabel(79, 49, '<Widget>[]')
];

List<ClosingLabel>? lastLabels;
Expand Down
2 changes: 1 addition & 1 deletion pkg/analysis_server/test/domain_execution_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ class A {
}
void contextFunction() {
var a = new A();
var a = A();
// context line
}
''';
Expand Down
2 changes: 1 addition & 1 deletion pkg/analysis_server/test/edit/fixes_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ dependencies:

// Configure the test file.
final file =
newFile('$workspaceRootPath/aaa/main.dart', 'void f() { new Foo(); }');
newFile('$workspaceRootPath/aaa/main.dart', 'void f() { Foo(); }');

await waitForTasksFinished();

Expand Down
4 changes: 2 additions & 2 deletions pkg/analysis_server/test/edit/organize_directives_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ import 'dart:collection';
void f() {
print(pi);
new HashMap();
HashMap();
}
''');
return _assertOrganized(r'''
Expand All @@ -148,7 +148,7 @@ import 'dart:math';
void f() {
print(pi);
new HashMap();
HashMap();
}
''');
}
Expand Down
36 changes: 18 additions & 18 deletions pkg/analysis_server/test/edit/refactoring_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -939,12 +939,12 @@ import 'package:flutter/material.dart';
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new Text('AAA');
return Text('AAA');
}
}
''');
await waitForTasksFinished();
await getRefactoringsForString('new Text');
await getRefactoringsForString('Text');
expect(kinds, contains(RefactoringKind.EXTRACT_WIDGET));
}

Expand Down Expand Up @@ -986,7 +986,7 @@ class A {
A.test() {}
}
void f() {
new A.test();
A.test();
}
''', 'test();');
}
Expand Down Expand Up @@ -1441,8 +1441,8 @@ class Test {
}
void f() {
Test v;
new Test();
new Test.named();
Test();
Test.named();
}
''');
return assertSuccessfulRefactoring(() {
Expand All @@ -1454,8 +1454,8 @@ class NewName {
}
void f() {
NewName v;
new NewName();
new NewName.named();
NewName();
NewName.named();
}
''');
}
Expand Down Expand Up @@ -1495,7 +1495,7 @@ class Test {
Test() {}
}
void f() {
new Test();
Test();
}
''');
return assertSuccessfulRefactoring(
Expand All @@ -1507,12 +1507,12 @@ class NewName {
NewName() {}
}
void f() {
new NewName();
NewName();
}
''',
feedbackValidator: (feedback) {
var renameFeedback = feedback as RenameFeedback;
expect(renameFeedback.offset, 44);
expect(renameFeedback.offset, 40);
expect(renameFeedback.length, 4);
},
);
Expand All @@ -1524,7 +1524,7 @@ class Test {
Test.named() {}
}
void f() {
new Test.named();
Test.named();
}
''');
return assertSuccessfulRefactoring(
Expand All @@ -1536,12 +1536,12 @@ class NewName {
NewName.named() {}
}
void f() {
new NewName.named();
NewName.named();
}
''',
feedbackValidator: (feedback) {
var renameFeedback = feedback as RenameFeedback;
expect(renameFeedback.offset, 50);
expect(renameFeedback.offset, 46);
expect(renameFeedback.length, 4);
},
);
Expand Down Expand Up @@ -1729,7 +1729,7 @@ class A {
A({this.test: 0});
}
void f() {
new A(test: 42);
A(test: 42);
}
''');
return assertSuccessfulRefactoring(() {
Expand All @@ -1740,7 +1740,7 @@ class A {
A({this.newName: 0});
}
void f() {
new A(newName: 42);
A(newName: 42);
}
''');
}
Expand Down Expand Up @@ -1896,7 +1896,7 @@ class A {
A.test() {}
}
void f() {
new A.test();
A.test();
}
''');
return assertSuccessfulRefactoring(
Expand All @@ -1908,12 +1908,12 @@ class A {
A.newName() {}
}
void f() {
new A.newName();
A.newName();
}
''',
feedbackValidator: (feedback) {
var renameFeedback = feedback as RenameFeedback;
expect(renameFeedback.offset, 45);
expect(renameFeedback.offset, 41);
expect(renameFeedback.length, 4);
},
);
Expand Down
Loading

0 comments on commit 705cd58

Please sign in to comment.