forked from eatvio/eatvio_app
refactor(tests): replace 'final' with 'const' for improved performance in various test files
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user