File tree Expand file tree Collapse file tree 1 file changed +26
-3
lines changed Expand file tree Collapse file tree 1 file changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -725,13 +725,36 @@ void main() {
725
725
);
726
726
},
727
727
);
728
- test (
729
- 'returns it when is longer than min and shorter than max ' ,
728
+ group (
729
+ 'returns it' ,
730
730
() {
731
731
final it = Duration (days: 0 );
732
732
final min = Duration (days: - 5 );
733
733
final max = Duration (days: 5 );
734
- expect (it.clamp (min: min, max: max), equals (it));
734
+ test (
735
+ 'when both min and max are null' ,
736
+ () {
737
+ expect (it.clamp (), equals (it));
738
+ },
739
+ );
740
+ test (
741
+ 'when is longer than min and max is null' ,
742
+ () {
743
+ expect (it.clamp (min: min), equals (it));
744
+ },
745
+ );
746
+ test (
747
+ 'when is shorter than max and min is null' ,
748
+ () {
749
+ expect (it.clamp (max: max), equals (it));
750
+ },
751
+ );
752
+ test (
753
+ 'when is longer than min and shorter than max' ,
754
+ () {
755
+ expect (it.clamp (min: min, max: max), equals (it));
756
+ },
757
+ );
735
758
},
736
759
);
737
760
test (
You can’t perform that action at this time.
0 commit comments