mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
added no EXIF test to evFromImage
This commit is contained in:
parent
60323f4856
commit
1b508ca894
1 changed files with 17 additions and 7 deletions
|
@ -4,11 +4,21 @@ import 'package:flutter_test/flutter_test.dart';
|
|||
import 'package:lightmeter/utils/ev_from_bytes.dart';
|
||||
|
||||
void main() {
|
||||
test(
|
||||
'evFromImage',
|
||||
() {
|
||||
final bytes = File('assets/camera_stub_image.jpg').readAsBytesSync();
|
||||
expectLater(evFromImage(bytes), completion(8.25230310752341));
|
||||
},
|
||||
);
|
||||
group('evFromImage', () {
|
||||
test(
|
||||
'camera_stub_image.jpg',
|
||||
() {
|
||||
final bytes = File('assets/camera_stub_image.jpg').readAsBytesSync();
|
||||
expectLater(evFromImage(bytes), completion(8.25230310752341));
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'no EXIF',
|
||||
() {
|
||||
final bytes = File('assets/launcher_icon_dev_512.png').readAsBytesSync();
|
||||
expectLater(evFromImage(bytes), completion(null));
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue