From cb6880da495dd18db2ee0cf027960ad48f662e37 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Sat, 13 Jan 2024 17:55:02 +0100 Subject: [PATCH] added `evFromImage` test --- test/utils/ev_from_bytes_test.dart | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 test/utils/ev_from_bytes_test.dart diff --git a/test/utils/ev_from_bytes_test.dart b/test/utils/ev_from_bytes_test.dart new file mode 100644 index 0000000..6f674ae --- /dev/null +++ b/test/utils/ev_from_bytes_test.dart @@ -0,0 +1,14 @@ +import 'dart:io'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:lightmeter/utils/ev_from_bytes.dart'; + +void main() { + test( + 'evFromImage', + () { + final bytes = File('assets/camera_stub_image.jpg').readAsBytesSync(); + expectLater(evFromImage(bytes), completion(8.25230310752341)); + }, + ); +}