Skip to content

Commit 912fa43

Browse files
committed
Fix more error codes
1 parent 25d3a30 commit 912fa43

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

packages/freezed/test/common_types_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void main() {
8383
nullabilityDifference: 42,
8484
typeDifference: 21,
8585
);
86-
// expect-error: UNDEFINED_GETTER
86+
// expect-error: undefined_getter
8787
value.unknown;
8888
}
8989
'''),
@@ -120,10 +120,10 @@ void main() {
120120
param.copyWith(
121121
// Since not all unions have a nullable property, we cannot assign "null"
122122
// on the shared interface.
123-
// expect-error: ARGUMENT_TYPE_NOT_ASSIGNABLE
123+
// expect-error: argument_type_not_assignable
124124
nullabilityDifference: null,
125125
// Since not all unions use the same type, we can't clone that property at all.
126-
// expect-error: UNDEFINED_NAMED_PARAMETER
126+
// expect-error: undefined_named_parameter
127127
typeDifference: 42,
128128
);
129129
}
@@ -174,10 +174,10 @@ void main() {
174174
param.copyWith.value(
175175
// Since not all unions have a nullable property, we cannot assign "null"
176176
// on the shared interface.
177-
// expect-error: ARGUMENT_TYPE_NOT_ASSIGNABLE
177+
// expect-error: argument_type_not_assignable
178178
nullabilityDifference: null,
179179
// Since not all unions use the same type, we can't clone that property at all.
180-
// expect-error: UNDEFINED_NAMED_PARAMETER
180+
// expect-error: undefined_named_parameter
181181
typeDifference: 42,
182182
);
183183
}
@@ -204,7 +204,7 @@ import 'integration/common_types.dart';
204204
205205
void main() {
206206
final param = CommonUnfreezed.one(a: 42, b: 3.14);
207-
// expect-error: ASSIGNMENT_TO_FINAL_NO_SETTER
207+
// expect-error: assignment_to_final_no_setter
208208
param.a = 42.24;
209209
// OK since all union cases are typed the same
210210
param.b = 42;

packages/freezed/test/deep_copy_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,8 @@ void main() {
734734
as ErrorsResult;
735735

736736
expect(errorResult.errors.map((e) => e.errorCode.name), [
737-
'UNUSED_RESULT',
738-
'UNUSED_RESULT',
737+
'unused_result',
738+
'unused_result',
739739
]);
740740
});
741741
}

0 commit comments

Comments
 (0)