Honor duration rounding in timeToFrames

Round nonzero duration frame counts away from zero while retaining
absolute-time rounding, default argument selection and numeric coercion.

Cover fractional durations, absolute controls, defaults and coercion.
Sort expected paths in the existing footage test for temporary-directory portability.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
sanyamsingh001
2026-10-14 03:21:23 +10:00
co-authored by Codex
parent 549e9d8251
commit 36ebe2eada
3 changed files with 82 additions and 2 deletions
+2 -1
View File
@@ -235,7 +235,8 @@ mod tests {
paths.sort();
// Windows joins the stored "media/..." onto the project's folder and leaves a path with mixed
// separators; `Path` equality compares components, so both spellings are the same file.
let expected = ["/nonexistent/ec/abs.png", clip.to_str().unwrap(), "media/ec-relative-gone.png"];
let mut expected = ["/nonexistent/ec/abs.png", clip.to_str().unwrap(), "media/ec-relative-gone.png"];
expected.sort();
assert_eq!(paths.len(), expected.len(), "{paths:?}");
for (got, want) in paths.iter().zip(expected) {
assert_eq!(std::path::Path::new(got), std::path::Path::new(want), "{paths:?}");