Skip to content

Commit 8ec420b

Browse files
committed
Add test
1 parent 0d9cf74 commit 8ec420b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/src/numeric/float_validator_test.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ void main() {
6767
expect(result, isNull);
6868
});
6969

70+
test('should return null if the value is a valid int', () {
71+
// Arrange
72+
const FloatValidator<num> validator = FloatValidator<num>();
73+
const int value = 5;
74+
75+
// Act
76+
final String? result = validator.validate(value);
77+
78+
// Assert
79+
expect(result, isNull);
80+
});
81+
7082
test('should return error if the value is not a valid float', () {
7183
// Arrange
7284
const FloatValidator<String> validator = FloatValidator<String>();

0 commit comments

Comments
 (0)