use tixonome::*; #[test] fn test_is_bpm_valid() { let mut opt = Opt { beats_per_minute: 190, beats_per_bar: 3, }; assert!(is_bpm_valid(&opt, 20, 200)); opt.beats_per_minute = 22; assert!(!is_bpm_valid(&mut opt, 40, 200)); } #[test] fn test_is_bpb_valid() { let mut opt = Opt { beats_per_minute: 149, beats_per_bar: 4, }; assert!(is_bpb_valid(&opt, 2, 4)); opt.beats_per_bar = 91; assert!(!is_bpb_valid(&mut opt, 2, 4)); }