mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-24 10:09:01 -06:00
#323: keep the default_is_automatic regression test
The PR branch dropped it along with the PREVIEW_LIMITS import; nothing here changes the default preview limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ad0b27c036
commit
6318364ce7
@@ -2,7 +2,7 @@
|
||||
//! loupe renders at the size it is drawn at (up to the photo's own pixels and a safety ceiling);
|
||||
//! "Preview size" in Settings only lowers that when the user asks for it.
|
||||
|
||||
use crate::state::{AppSettings, LOUPE_EDGE_CEILING, STANDARD_PREVIEW_EDGE};
|
||||
use crate::state::{AppSettings, LOUPE_EDGE_CEILING, PREVIEW_LIMITS, STANDARD_PREVIEW_EDGE};
|
||||
|
||||
/// A texture side no GPU we run on refuses (see the tests of small ones below).
|
||||
const BIG: usize = 16384;
|
||||
@@ -11,6 +11,13 @@ fn with_limit(preview_limit: u32) -> AppSettings {
|
||||
AppSettings { preview_limit, ..Default::default() }
|
||||
}
|
||||
|
||||
// Given a fresh install
|
||||
#[test]
|
||||
fn default_is_automatic() {
|
||||
assert_eq!(AppSettings::default().preview_limit, 0);
|
||||
assert_eq!(PREVIEW_LIMITS[0], 0, "Automatic is the first choice");
|
||||
}
|
||||
|
||||
// Given Automatic, when a 24 MP photo is shown at 1:1, then the render is the photo's own width
|
||||
#[test]
|
||||
fn automatic_renders_a_one_to_one_view_at_native_size() {
|
||||
|
||||
Reference in New Issue
Block a user