m3_lightmeter/test/utils/ev_from_bytes_test.dart
Vadim 73d0c32323
Hide Pro features from the metering screen (#147)
* implemented `MockCameraContainerBloc` to stub camera on simulator

* hide pro features from metering screen

* disable pro features in settings

* use closed child background color in `AnimatedDialog`

* adjust `AnimatedDialogPicker` to items count

* close `AnimatedDialog` through context

* cleanup

* fixed `ReadingValueContainer` text color

* removed legacy translations

* fixed tests

* fixed `AnimatedDialog` scaling

* added `evFromImage` test

* added no EXIF test to `evFromImage`
2024-01-13 18:20:58 +01:00

24 lines
586 B
Dart

import 'dart:io';
import 'package:flutter_test/flutter_test.dart';
import 'package:lightmeter/utils/ev_from_bytes.dart';
void main() {
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));
},
);
});
}