m3_lightmeter/test/utils/ev_from_bytes_test.dart

25 lines
586 B
Dart
Raw Permalink Normal View History

2024-01-13 16:55:02 +00:00
import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:lightmeter/utils/ev_from_bytes.dart';
void main() {
2024-01-13 17:04:47 +00:00
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));
},
);
});
2024-01-13 16:55:02 +00:00
}