mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-06-19 12:13:32 +00:00
feat: better testing (#131)
* add tests * update github actions to include testing step * optimization
This commit is contained in:
committed by
GitHub
parent
0476329798
commit
e91465365d
@@ -139,3 +139,16 @@ pub fn start_app_state_thread(audio_player_state_shared: Arc<Mutex<AudioPlayerSt
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_format_time_pair() {
|
||||
assert_eq!(format_time_pair(0.0, 0.0), "00:00/00:00");
|
||||
assert_eq!(format_time_pair(5.4, 10.0), "00:05/00:10");
|
||||
assert_eq!(format_time_pair(59.9, 125.1), "01:00/02:05");
|
||||
assert_eq!(format_time_pair(3600.0, 7205.0), "60:00/120:05");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user