mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-23 16:00:41 +00:00
886188bb9e
* Added histogram and separated camera view builder * Added histogram to `MeteringScreenLayoutConfig` * `ResolutionPreset.medium` -> `ResolutionPreset.low` * Adjusted histogram paddings
57 lines
1.3 KiB
Dart
57 lines
1.3 KiB
Dart
import 'package:lightmeter/data/models/metering_screen_layout_config.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
group(
|
|
'fromJson()',
|
|
() {
|
|
test('All keys', () {
|
|
expect(
|
|
MeteringScreenLayoutConfigJson.fromJson(
|
|
{
|
|
'0': true,
|
|
'1': true,
|
|
'2': true,
|
|
},
|
|
),
|
|
{
|
|
MeteringScreenLayoutFeature.extremeExposurePairs: true,
|
|
MeteringScreenLayoutFeature.filmPicker: true,
|
|
MeteringScreenLayoutFeature.histogram: true,
|
|
},
|
|
);
|
|
});
|
|
|
|
test('Legacy (no equipment profiles)', () {
|
|
expect(
|
|
MeteringScreenLayoutConfigJson.fromJson(
|
|
{
|
|
'0': true,
|
|
'1': true,
|
|
},
|
|
),
|
|
{
|
|
MeteringScreenLayoutFeature.extremeExposurePairs: true,
|
|
MeteringScreenLayoutFeature.filmPicker: true,
|
|
MeteringScreenLayoutFeature.histogram: true,
|
|
},
|
|
);
|
|
});
|
|
},
|
|
);
|
|
|
|
test('toJson', () {
|
|
expect(
|
|
{
|
|
MeteringScreenLayoutFeature.extremeExposurePairs: true,
|
|
MeteringScreenLayoutFeature.filmPicker: true,
|
|
MeteringScreenLayoutFeature.histogram: true,
|
|
}.toJson(),
|
|
{
|
|
'0': true,
|
|
'1': true,
|
|
'2': true,
|
|
},
|
|
);
|
|
});
|
|
}
|