Skip to content

Commit

Permalink
add test on image_image_cropper_test.dart for #143
Browse files Browse the repository at this point in the history
  • Loading branch information
chooyan-eng committed Feb 26, 2024
1 parent 505e12c commit b51dfd0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/logic/cropper/image_image_cropper_test.dart
Expand Up @@ -86,5 +86,23 @@ void main() {
);
},
);

test(
'NegativeSizeError is NOT thrown'
'if the value of bottomRight is slightly greater than image size',
() async {
final croppedImage = await cropper.call(
original: testImage,
topLeft: Offset(100, 50),
bottomRight: Offset(656.0004, 453.00005),
);

final imageDetail = decodeImage(croppedImage);

expect(imageDetail, isNotNull);
expect(imageDetail!.width, 556);
expect(imageDetail.height, 403);
},
);
});
}

0 comments on commit b51dfd0

Please sign in to comment.