Morph test: sort the ids before dedup so it really checks uniqueness (#25)

dedup only removes consecutive duplicates, so two equal ids that were not
adjacent would have passed. Follow-up to the review note on #5.

generated with Claude Code
This commit is contained in:
alexanderalber 2026-10-10 12:17:24 +02:00 committed by GitHub
parent e17fcd5598
commit 08d57ca15c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -569,6 +569,7 @@ fn morph_frame_moves_blends_and_fades() {
assert!((f.opacity_of(f.shapes[2].0.id) - 0.5).abs() < 1e-9);
// Ids are fresh and unique.
let mut ids: Vec<_> = f.shapes.iter().map(|(s, _)| s.id).collect();
ids.sort();
ids.dedup();
assert_eq!(ids.len(), 3);
assert!(ids.iter().all(|i| i.0 > 4));