Migrate pkg/expect to the new constructor syntax.

Change-Id: I872868b7f9dea21889aeac00a92eef0b03849354
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/506603
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
This commit is contained in:
Robert Nystrom
2026-05-27 16:17:46 -07:00
committed by dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent 9f11b2fd45
commit 5ccd5818e0
5 changed files with 6 additions and 4 deletions
+2
View File
@@ -7,3 +7,5 @@ analyzer:
linter:
rules:
- lines_longer_than_80_chars
- unnecessary_const_in_enum_constructor
- unnecessary_type_name_in_constructor
+1 -1
View File
@@ -913,7 +913,7 @@ class ExpectException {
final String message;
final String name;
ExpectException(this.message) : name = _getTestName();
new(this.message) : name = _getTestName();
@override
String toString() {
+1 -1
View File
@@ -208,5 +208,5 @@ class _Group {
class _Expectation {
final _ExpectationFunction function;
_Expectation(this.function);
new(this.function);
}
+1 -1
View File
@@ -10,7 +10,7 @@ description: >-
publish_to: none
environment:
sdk: '^3.12.0-0'
sdk: '^3.13.0-0'
resolution: workspace
+1 -1
View File
@@ -87,7 +87,7 @@ void main() {
class C {
final Object x;
const C(this.x);
const new(this.x);
@override
int get hashCode => x.hashCode;
@override