forge
Explore
Log in

Don't you dare go Hollow

edith

Clone
★ 0

0 watching0 forksRust18.3 MiBff99ad6Tahinli6 days ago1055 commits

seq2.rs43 lines, 1.8 KiBHistoryRawDownload
1//! Sequences, second round: compound clips draw like clips, the library counts nested use,
2//! the clip menu folds the compound verbs into one submenu, and plurals are words.
3
4use super::*;
5use keymap::ActionId;
6
7/// No sequence message ships a "(s)".
8#[test]
9fn sequence_messages_use_count_noun() {
10 let code = src_text("player/sequences.rs");
11 assert!(!code.contains("(s)"), "sequences.rs still says (s)");
12 assert!(code.contains("count_noun(clips.len(), \"clip\", \"clips\")"));
13}
14
15/// The clip menu lists the compound verbs, and they fold into a "Compound" submenu next to
16/// "Adjust" so the top level still fits a 720 window.
17#[test]
18fn the_clip_menu_folds_the_compound_verbs_into_one_submenu() {
19 for a in [ActionId::NestClips, ActionId::BreakApart, ActionId::OpenCompound, ActionId::FlattenMulticam] {
20 assert!(MENU_ITEMS.contains(&a), "{a:?}");
21 assert!(crate::menus::compound_item(a));
22 assert!(!crate::menus::adjust_item(a));
23 }
24 assert!(!crate::menus::compound_item(ActionId::Cut));
25 let overlays = src_text("ui/overlays.rs");
26 assert!(overlays.contains("\"Compound\""), "the submenu row is drawn");
27}
28
29/// The compound's trace and the overview are drawn from the clips it stands for.
30#[test]
31fn a_compound_is_drawn_from_its_pieces() {
32 let clip = src_text("ui/bench_stance/clip.rs");
33 assert!(clip.contains("compound_pieces(lane.kind, clip)"));
34 let overview = src_text("ui/bench_stance/overview.rs");
35 assert!(overview.contains("compound_pieces(lane.kind, clip)"));
36}
37
38/// A source used only inside a nested sequence is on the timeline as far as the library goes.
39#[test]
40fn the_library_counts_use_in_every_sequence() {
41 assert!(src_text("player/actions.rs").contains("source_uses_parked(idx)"));
42 assert!(src_text("ui/dock_stance.rs").contains("source_uses_parked(source_idx)"));
43}