refactor(tests): replace 'final' with 'const' for improved performance in various test files

This commit is contained in:
mso7nueh
2025-12-08 11:32:40 +03:00
parent c2a506cdbf
commit 746d366c18
56 changed files with 199 additions and 254 deletions

View File

@@ -4,7 +4,7 @@ import 'package:flutter_test/flutter_test.dart';
void main() {
group('SelectionPopupModel', () {
test('creates model with all parameters', () {
final model = SelectionPopupModel(
const model = SelectionPopupModel(
id: 1,
title: 'Test Title',
value: 'Test Value',
@@ -18,7 +18,7 @@ void main() {
});
test('creates model with default isSelected value', () {
final model = SelectionPopupModel(
const model = SelectionPopupModel(
title: 'Test Title',
value: 'Test Value',
);
@@ -27,7 +27,7 @@ void main() {
});
test('creates model with null id', () {
final model = SelectionPopupModel(
const model = SelectionPopupModel(
id: null,
title: 'Test Title',
value: 'Test Value',
@@ -38,17 +38,17 @@ void main() {
});
test('creates model with different value types', () {
final model1 = SelectionPopupModel(
const model1 = SelectionPopupModel(
title: 'Test',
value: 123,
);
final model2 = SelectionPopupModel(
const model2 = SelectionPopupModel(
title: 'Test',
value: 'String Value',
);
final model3 = SelectionPopupModel(
const model3 = SelectionPopupModel(
title: 'Test',
value: true,
);
@@ -59,13 +59,13 @@ void main() {
});
test('can be compared', () {
final model1 = SelectionPopupModel(
const model1 = SelectionPopupModel(
id: 1,
title: 'Test',
value: 'Value',
);
final model2 = SelectionPopupModel(
const model2 = SelectionPopupModel(
id: 1,
title: 'Test',
value: 'Value',