mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2025-05-14 20:20:40 +00:00

* extract focal length from exif * added focal length section * wip * [android] calculate EFL * split other platform handlers to separate files * [ios] calculate EFL * updated translations * deleted `focalLengthFromTags` * fixed unit tests * [ios] link missing files * updated Pro features screen * [ios] fixed signing * fixed screenshot generator * updated goldens * [android] updated store screenshots * wip * [ios] updated store screenshots * enable focal length feature by default * mock camera focal length for integration tests * cleanup * added logging to `CameraInfoService`
52 lines
1.1 KiB
Dart
52 lines
1.1 KiB
Dart
import 'package:lightmeter/data/models/camera_feature.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
group(
|
|
'fromJson()',
|
|
() {
|
|
test('All keys', () {
|
|
expect(
|
|
CameraFeaturesConfigJson.fromJson(
|
|
{
|
|
'spotMetering': true,
|
|
'histogram': true,
|
|
'showFocalLength': true,
|
|
},
|
|
),
|
|
{
|
|
CameraFeature.spotMetering: true,
|
|
CameraFeature.histogram: true,
|
|
CameraFeature.showFocalLength: true,
|
|
},
|
|
);
|
|
});
|
|
|
|
test('Legacy', () {
|
|
expect(
|
|
CameraFeaturesConfigJson.fromJson({}),
|
|
{
|
|
CameraFeature.spotMetering: true,
|
|
CameraFeature.histogram: false,
|
|
CameraFeature.showFocalLength: true,
|
|
},
|
|
);
|
|
});
|
|
},
|
|
);
|
|
|
|
test('toJson()', () {
|
|
expect(
|
|
{
|
|
CameraFeature.spotMetering: true,
|
|
CameraFeature.histogram: true,
|
|
CameraFeature.showFocalLength: true,
|
|
}.toJson(),
|
|
{
|
|
'spotMetering': true,
|
|
'histogram': true,
|
|
'showFocalLength': true,
|
|
},
|
|
);
|
|
});
|
|
}
|