test+refactor: identifying missing pieces

This commit is contained in:
stop screaming 2026-02-20 23:03:02 +02:00
parent 7b8a48ad09
commit 7afab8eade
12 changed files with 1781 additions and 1435 deletions

View file

@ -1,13 +1,38 @@
use crate::*;
#[cfg(test)] #[test] fn test_menu () -> Usually<()> {
// Some dizzle.
// What indentation to use here lol?
let source = stringify!((mode :menu
(name Menu)
(info Mode selector.)
(keys :axis/y :confirm)
(view (bg (g 0) (bsp/s
:ports/out
(bsp/n
:ports/in
(bg (g 30) (bsp/s
(fixed/y 7 :logo)
(fill :dialog/menu)))))))));
// Load this definition into the config.
// A "mode" is basically a state machine
// with associated input and output definitions.
let mode = Config::new(None).add(&source)?.get_mode(":menu");
Ok(())
}
#[cfg(test)] #[test] fn test_cli () {
use clap::CommandFactory;
cli::Cli::command().debug_assert();
Cli::command().debug_assert();
//let jack = Jack::default();
}
#[cfg(test)] #[test] fn test_app () -> Usually<()> {
let mut app = model::App::default();
let mut app = App::default();
let _ = app.scene_add(None, None)?;
let _ = app.update_clock();
Ok(())
@ -59,7 +84,7 @@ use crate::*;
}
#[cfg(test)] #[test] fn test_view_iter () {
let mut app = model::App::default();
let mut app = App::default();
app.project.editor = Some(Default::default());
//let _: Vec<_> = app.project.inputs_with_sizes().collect();
//let _: Vec<_> = app.project.outputs_with_sizes().collect();
@ -70,7 +95,7 @@ use crate::*;
}
#[cfg(test)] #[test] fn test_view_sizes () {
let app = model::App::default();
let app = App::default();
let _ = app.project.w();
//let _ = app.project.w_sidebar();
//let _ = app.project.w_tracks_area();