We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d9cf74 commit 8ec420bCopy full SHA for 8ec420b
test/src/numeric/float_validator_test.dart
@@ -67,6 +67,18 @@ void main() {
67
expect(result, isNull);
68
});
69
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
82
test('should return error if the value is not a valid float', () {
83
// Arrange
84
const FloatValidator<String> validator = FloatValidator<String>();
0 commit comments