mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-04-04 16:40:41 +00:00
27 lines
732 B
Dart
27 lines
732 B
Dart
import 'dart:io';
|
|
|
|
import 'package:exif/exif.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:lightmeter/utils/exif_utils.dart';
|
|
|
|
void main() {
|
|
group('evFromTags', () {
|
|
test(
|
|
'camera_stub_image.jpg',
|
|
() async {
|
|
final bytes = File('assets/camera_stub_image.jpg').readAsBytesSync();
|
|
final tags = await readExifFromBytes(bytes);
|
|
expectLater(evFromTags(tags), completion(8.25230310752341));
|
|
},
|
|
);
|
|
|
|
test(
|
|
'no EXIF',
|
|
() async {
|
|
final bytes = File('assets/launcher_icon_dev_512.png').readAsBytesSync();
|
|
final tags = await readExifFromBytes(bytes);
|
|
expectLater(evFromTags(tags), throwsArgumentError);
|
|
},
|
|
);
|
|
});
|
|
}
|