mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 11:46:41 +01:00
generate coverage from correct target
This commit is contained in:
parent
be6bd32b78
commit
ffe8893bed
8 changed files with 57 additions and 12 deletions
|
|
@ -59,3 +59,25 @@ pub fn update_keys (keys: &mut[bool;128], message: &MidiMessage) {
|
|||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)] #[test] pub fn test_midi_clip () {
|
||||
let clip = MidiClip::stop_all();
|
||||
println!("{clip:?}");
|
||||
let clip = MidiClip::default();
|
||||
let mut clip = MidiClip::new("clip", true, 1, None, None);
|
||||
clip.set_length(96);
|
||||
clip.toggle_loop();
|
||||
clip.record_event(12, midly::MidiMessage::NoteOn { key: 36.into(), vel: 100.into() });
|
||||
assert!(clip.contains_note_on(36.into(), 6, 18));
|
||||
assert_eq!(&clip.notes, &clip.duplicate().notes);
|
||||
let clip = std::sync::Arc::new(clip);
|
||||
assert_eq!(clip.clone(), clip);
|
||||
}
|
||||
#[cfg(test)] #[test] pub fn test_midi_edit () {
|
||||
let editor = MidiEditor::default();
|
||||
println!("{editor:?}");
|
||||
}
|
||||
#[cfg(test)] #[test] pub fn test_midi_player () {
|
||||
let player = MidiPlayer::default();
|
||||
println!("{player:?}");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! MIDI clip data.
|
||||
use crate::*;
|
||||
|
||||
pub trait HasMidiClip {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! MIDI editor.
|
||||
use crate::*;
|
||||
pub trait HasEditor {
|
||||
fn editor (&self) -> &Option<MidiEditor>;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
//! MIDI player
|
||||
use crate::*;
|
||||
pub trait HasPlayer {
|
||||
fn player (&self) -> &impl MidiPlayerApi;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue